FAQ Database Discussion Community


Does zlib's “uncompress” preserve the data's original endianness, or does it do an endian conversion?

zlib,endianness,uncompress
I am working with legacy C++ code that accesses two-byte integer data compressed in a sqlite database. The code uses zlib's uncompress function to extract the data, which comes out on my little-endian machine as little-endian values. To allow for the possibility that this code may be ported to big-endian...