Hi, I want to report a flaw in the gzip program when using option -l Version: Gzip for Windows as available from http://gnuwin32.sourceforge.net/packages/gzip.htm Version 1.3.12, 32 bit.
Symptom: "gzip -l" reports wrong original size and possibly negative compression ratio when original size is bigger than 4GByte. Reproduce: 1. Create a file that is bigger than 4 GB, for example the file "gziptest" with size 4,394,364,468 bytes. 2. Compress this file using gzip, in this example by "gzip gziptest" 3. against the compressed version, run "gzip -l", in this example "gzip -l gziptest.gz" ==> gzip reports a wrong original size and possibly a negative compression rate, similar to this: C:\temp>gzip -l gziptest.gz compressed uncompressed ratio uncompressed_name 384204661 99397172 -286.5% gziptest In other words, an unsigned long 32 bit integer is used for the computation which has an unhandled overflow. Thus, the hex value 100000000x == 4,294,967,296 is accidentally subtracted from the correct original length. If someone provides a fix for this, please let me know. Best regards, Andreas ----------------------------------------------------------- Dr. Andreas Arning Master Inventor WebSphere Business Process Solutions - Business Process Choreographer BPM Samples - http://publib.boulder.ibm.com/bpcsamp/index.html Phone: +49-7031-16-2359 ----------------------------------------------------------- IBM Deutschland Entwicklung GmbH Vorsitzender des Aufsichtsrats: Martin Jetter Geschäftsführung: Herbert Kircher Sitz der Gesellschaft: Böblingen Registergericht: Amtsgericht Stuttgart, HRB 243294 -----------------------------------------------------------