bug-gzip
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gzip test file+1byte gives unexpected end of file


From: Paul Eggert
Subject: Re: gzip test file+1byte gives unexpected end of file
Date: Fri, 10 May 2013 14:34:50 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130311 Thunderbird/17.0.4

That's odd.  I can't reproduce the problem on Fedora 17,
with either the bundled gzip (1.4) or with
gzip 1.5 (which I built myself).  For example:

$ rm test.gz x.gz
$ : | gzip >test.gz
$ dd if=/dev/zero bs=1 count=77 >> test.gz
77+0 records in
77+0 records out
77 bytes (77 B) copied, 0.000514876 s, 150 kB/s
$ dd if=test.gz count=1 bs=22 > x.gz
1+0 records in
1+0 records out
22 bytes (22 B) copied, 0.000159583 s, 138 kB/s
$ gunzip -tv x.gz
x.gz:   
gzip: x.gz: decompression OK, trailing zero bytes ignored
 OK
$ dd if=test.gz count=1 bs=21 > x.gz
1+0 records in
1+0 records out
21 bytes (21 B) copied, 0.0446526 s, 0.5 kB/s
$ gunzip -tv x.gz
x.gz:   
gzip: x.gz: decompression OK, trailing zero bytes ignored
 OK
$ dd if=test.gz count=1 bs=20 > x.gz
1+0 records in
1+0 records out
20 bytes (20 B) copied, 0.0646803 s, 0.3 kB/s
$ gunzip -tv x.gz
x.gz:    OK


This all looks right.  (You wrote that the last output
was "unexpected", but the compressed file is 20 bytes,
right? so the 20-byte copy should work.)

For the 21-byte case, can you please send the output of
the command

strace -o trace.txt gunzip -tv x.gz

That is, what gets put into the file trace.txt?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]