BZipCompression
BZipCompression copied to clipboard
decompress not working
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)