[Top][All Lists]

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

Re: Error with file compressed with PKZIP on Z/os Mainframe

From: Paul Eggert
Subject: Re: Error with file compressed with PKZIP on Z/os Mainframe
Date: Sun, 06 May 2012 23:36:41 -0700
User-agent: Mozilla/5.0 (X11; Linux i686; rv:12.0) Gecko/20120430 Thunderbird/12.0.1

On 05/06/2012 09:00 PM, Techow, Ric wrote:
gunzip: FLEXCBA0001241111251111_RT.gz: invalid compressed data--length error

This occurs when the length field in the .gz file
is not equal to the actual length modulo 2**32.
Due to a shortcoming in the gzip file format, there's
only 32 bits to store the length field, so gzip can
compare only the bottom 32 bits of the length
to the true length.

Given that the problematic file is 5.2G, and that
you're seeing this message, my guess is that
z/OS PKZIP is generating a .gz file whose
length field is incorrect, if the input contains
more than 2**32 bytes.  You can check this guess
by running "gunzip -l FLEXCBA0001241111251111_RT.gz".
For example:

$ ls -l /tmp/big*
-rw-r--r-- 1 eggert eggert 5557452912 May  6 23:31 /tmp/big
$ gzip -1 /tmp/big
$ ls -l /tmp/big*
-rw-r--r-- 1 eggert eggert 24242218 May  6 23:31 /tmp/big.gz
$ gzip -lv /tmp/big.gz
method  crc     date  time           compressed        uncompressed  ratio 
defla 0bc93137 May  6 23:31            24242218          1262485616  98.1% 

Notice that 5557452912 % (2**32) == 1262485616,
so 1262485616 is the correct value in the "size"
field (the "ratio" column is bogus of course).
My guess is that your .gz file has
the wrong value in its "size" field.

reply via email to

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