lzip-bug
[Top][All Lists]
Advanced

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

Re: [Lzip-bug] about lzip..


From: Antonio Diaz Diaz
Subject: Re: [Lzip-bug] about lzip..
Date: Thu, 20 Nov 2008 18:51:10 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.7.11) Gecko/20050905

Jan Engelhardt wrote:
Lzip provides a much simpler and reliable implementation. Lzip also
provides a simple but safe file format, with magic bytes

"LZIP" I see, but is the magic perhaps a bit longer, without me
having to inspect the source?

You only need to read the fine manual, section "File Format". As you can see, the file format is extensible:

------------------------------------------------------------
The compressed file format produced by lzip is this:


+---+---+---+---+----+----+=============+-+-+-+-+-+-+-+-+-+-+-+-+
|  Magic bytes  | VN | DB | Lzma stream | CRC32 |   file size   |
+---+---+---+---+----+----+=============+-+-+-+-+-+-+-+-+-+-+-+-+

   All multibyte values are stored in little endian order.

`Magic bytes'
     A four byte string, identifying the file type, with the value
     "LZIP".

`VN (version number, 1 byte)'
     Just in case something needs to be modified in the future. 0x00
     for now.

`DB (dictionary bits, 1 byte)'
     Base 2 logarithm of the dictionary size. Valid values range from
     12 to 30 (4KiB to 1GiB).

`Lzma stream'
     The lzma stream, finished by an end of stream marker. Uses default
     values for encoder properties.

`CRC32 (4 bytes)'
     CRC of the uncompressed original file.

`file size (8 bytes)'
     Size of the uncompressed original file.

------------------------------------------------------------

Best regards,
Antonio.




reply via email to

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