gzip 1.4-1 creates corrupt archive

KHMan keinhong@gmail.com
Tue Aug 28 00:09:00 GMT 2012

On 8/27/2012 8:01 PM, Ryan Johnson wrote:
> On 27/08/2012 7:29 AM, Earnie Boyd wrote:
>> On Sun, Aug 26, 2012 at 12:38 AM, K Stahl wrote:
>>> [snip snip snip]
>> [snip snip snip]
> [snip snip snip]
> Back on topic, I can't repro using text or binary (executable)
> files, which makes me wonder whether the issue is the constant
> appending the OP mentioned. Perhaps gzip reads twice from the
> growing log file in a way that confuses it, and bzip2 doesn't?
> Perhaps there's some weirdness with atimes that makes gzip think
> the file is unchanged when it actually has grown?

Same for me on text and binary files. I think OP should test 
non-updated text and binary files, that would certainly help to 
prove or disprove some theories.

Also failed to create a corrupted gzip file by manually appending 
from another terminal during compression. After all, gzip is 
reading from stdin only what it gets from cat, and gzip has been 
handling stdin/stdout since forever. Sounds simple enough...

OP gave (reproduced as follows):
 > To trim a log file on my windows box I tried the lines
 > below in a bash script. (my bash is 4.1.10(4))

cat "$LOG" | gzip > "$LOG.old.gz"
 > "$LOG"

What was the error message reported by gzip for the corrupted 
file? gzip has a very simple file structure, if OP can share a 
corrupt file, it should be pretty easy to learn exactly what 
aspect of the gzip file is broken.

Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia

Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

More information about the Cygwin mailing list