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: Jacob Rief
Subject: Re: [Lzip-bug] Version 0.8-rc2 of lzlib released
Date: Tue, 12 Jan 2010 08:15:17 +0100

Hello Antonio,
hmm, then shouldn't it be
1) if the decompressor was not yet initialized, then LZ_decompress_open
   Ann.: the (compressed) input stream is somewhere in the middle of
a chunk and therefore effectively rubbish.
    is an LZ_decompress_write here a must?
2) LZ_decompress_sync_to_member
3) LZ_decompress_write
4) go back to step 3 until LZ_decompress_read returnes > 0
continue with decompression as usual

In the current algorithm, I don't understand why LZ_decompress_write
is before LZ_decompress_sync_to_member?

Regards,
Jacob

> 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]