zlib-1.2.3-14.fc8 Attached is a test program for zlib's uncompress(). It returns -3 (Z_DATA_ERROR) for every file I created. 1. Copy a test file locally, make a note of the uncompressed size 2. Compress it with gzip 3. Run ./test on the compressed file, verify that the uncompressed length matches the one in 1, and wonder why it can't uncompress the data
Created attachment 215651 [details] test.c
Ivana tells me that uncompress() only works when passed the data, and no trailing data, or headers data. But the documentation says: "This function can be used to decompress a whole file at once if the input file is mmap'ed." The documentation should be fixed: "This function can be used to decompress a whole file at once if the input file is mmap'ed, and headers and trailing data are stripped from the input."