lzip-bug
[Top][All Lists]
Advanced

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

Re: [Lzip-bug] How to reset a LZ_Decoder


From: Antonio Diaz Diaz
Subject: Re: [Lzip-bug] How to reset a LZ_Decoder
Date: Fri, 18 Dec 2009 20:35:59 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.7.11) Gecko/20050905

Hello Jacob, sorry for the delay, but I am lately receiving more mails than I can reply.

Jacob Rief wrote:
is there any way to reset a LZ_Decoder?

Currently not.


Assume the buffers and flags of an LZ_Decoder are filled with some
kind of data, but for some reason (for instance a stream corruption)
you want forward up to the next member and start decompression from
there. Thus instead of destroying and recreating a LZ_Decoder, a
useful function would be to somehow clear the buffers and reset the
internal flags to a state equivalent to a decoder just after creation,
say LZ_decompress_reset(struct LZ_Decoder* decoder);

Resetting the internal flags to a state equivalent to a decoder just after creation can't work. Suppose the next header has not been yet fed to LZ_decompress_write. You'll have to switch to a "search" state, then write data until the header is found.

Certainly this case deserves its own explicit function, in addition to any LZ_decompress_reset that we may find useful to implement, but I'm afraid I can write it until next year.


Regards,
Antonio.




reply via email to

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