Compressed data length is bigger than the input data
karthikprabhuA opened this issue · 2 comments
karthikprabhuA commented
NSString *inputString = @"Hello World!";
inputData length = 12 bytes
compressedData length = 32 bytes
what is the problem ?
nicklockwood commented
The GZIP compression algorithm has a fixed overhead (e.g. it includes a a standard header so you can tell that it's a GZIP data file). It's not surprising that for very tiny amounts of data, this overhead increases the overall file size.
karthikprabhuA commented
thanks @nicklockwood