So I have an array of bytes that I would like to decompress using the uncompress
function in zlib
but it always returns Z_DATA_ERROR
. So my question is, does zlib support .zip files?
code:
const unsigned char zip [] = { /*some bytes*/};
unsigned char* decompressed = new unsigned char[decompressedSize];
unsigned char* compressed = new unsigned char[zipSize];
int result = uncompress(decompressed, &decompressedSize, zip, zipSize);