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.


_______________________________________________
Lzip-bug mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lzip-bug

Reply via email to