COMPRESSION_ZLIB to zlib-compress data in an iOS app, but the result is missing the zlib header.
size = compression_encode_buffer(
sourceBuffer, sourceBufferSize, nil,
Will return the bytes:
AD 53 C1 8E 9B 30 …
While using, for example, Python's
data.encode("zlib") on the same data will return:
78 9C AD 53 C1 8E 9B 30 …
^^ ^^ correct zlib header
What's up with that? Why isn't the header being included? And is there a "correct" way to add it?