BZipCompression icon indicating copy to clipboard operation
BZipCompression copied to clipboard

decompress not working

Open HPRaval opened this issue 7 years ago • 0 comments

I am using your code in swift 2.3. I am able to compress data but when i decompress it, it doesn't show me original string. Here is my code.

 let stringData = "You probably want to read your data from a file or another data source rather than using string literals.".dataUsingEncoding(NSUTF8StringEncoding)!
       // var error: NSError? = nil
        let compressedData = try! BZipCompression.compressedDataWithData(stringData, blockSize: BZipDefaultBlockSize, workFactor: BZipDefaultWorkFactor)

        print(compressedData)
        
        let decompress = try! BZipCompression.decompressedDataWithData(compressedData)
        
        print(decompress)

HPRaval avatar Mar 06 '17 09:03 HPRaval