[PATCH 2/15] boot: record header bytes in gunzip_start

Milton Miller miltonm at bga.com
Thu Jul 19 14:46:51 EST 2007


On Jul 18, 2007, at 9:11 PM, David Gibson wrote:

> On Tue, Jul 10, 2007 at 05:08:05PM -0500, Milton Miller wrote:
>>
>> Record the number of header bytes skipped in the total bytes read 
>> field.
>>
>> This is needed for the initramfs parsing code to find the end of the 
>> zip file.
>>
>> Signed-off-by: Milton Miller <miltonm at bga.com>
>
> Ok... I assume you've checked that this is actually the correct
> semantics for that field of the zlib structure?

 From looking at the comments in include/linux/zlib.h, I think its 
consistent.  It talks about looking at that field for statistics and 
for the application to record how many bytes were read during 
compression.  It mentions it brifely in the inflateSync to show how 
many bytes have been processed.   So I say its consistent to say we 
have processed the header bytes in the input file.

It appears to be for recording the number of bytes processed over all 
iterations.

I dig into zlib to see if this matches the beahvior of decompressing a 
zlib header, but expect it would match.


milton




More information about the Linuxppc-dev mailing list