Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 318031 - uncompress() doesn't work
uncompress() doesn't work
Product: Fedora
Classification: Fedora
Component: zlib (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: Ivana Varekova
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2007-10-04 06:27 EDT by Bastien Nocera
Modified: 2007-11-30 17:12 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-10-10 03:00:22 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
test.c (2.42 KB, text/plain)
2007-10-04 06:27 EDT, Bastien Nocera
no flags Details

  None (edit)
Description Bastien Nocera 2007-10-04 06:27:58 EDT

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
Comment 1 Bastien Nocera 2007-10-04 06:27:58 EDT
Created attachment 215651 [details]
Comment 2 Bastien Nocera 2007-10-08 07:34:34 EDT
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."

Note You need to log in before you can comment on or make changes to this bug.