lzip-bug
[Top][All Lists]
Advanced

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

Re: [Lzip-bug] Version 0.8-rc2 of lzlib released


From: Antonio Diaz Diaz
Subject: Re: [Lzip-bug] Version 0.8-rc2 of lzlib released
Date: Mon, 11 Jan 2010 17:17:48 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.7.11) Gecko/20050905

Hello Jacob,

Jacob Rief wrote:
now I wanted to implement a mechanism in my lzip stream, in order to
forward to the next valid member using LZ_decompress_sync_to_member.

You should not use LZ_decompress_reset in this case, because it discards all written data. LZ_decompress_reset "resets the internal state of DECODER as it was just after opening it with the `LZ_decompress_open' function."

The following should work:
  1) LZ_decompress_open
     the (compressed) input stream does not start with a valid LZIP header
  2) LZ_decompress_write
  3) LZ_decompress_sync_to_member
     now do a decompression as usual (write/read). LZ_decompress_read will
     return 0 until a header is found. Decompression restarts then from
     the stream position of the header found.

You should be able to switch steps 2-3 to easily remove leading garbage from the lzip compressed stream.


Regards,
Antonio.




reply via email to

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