lzip-bug
[Top][All Lists]
Advanced

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

[Lzip-bug] [Success] Starting decompression in the middle of the stream


From: Jacob Rief
Subject: [Lzip-bug] [Success] Starting decompression in the middle of the stream
Date: Wed, 13 Jan 2010 22:59:42 +0100

Hello Antonio,
thanks to the two functions LZ_decompress_sync_to_member and
LZ_decompress_reset, now I am able to start a decompression at any
position of the stream. Of course, valid data can be obtained only
after the decoder has been resynced on the next member.

This is the algorithm I used successfully:
Assumption 1) The decoder was already initialized.
Assumption 2) The file descriptor points onto any position, the stream
effectively contains rubbish.

1) LZ_decompress_reset
2) LZ_decompress_sync_to_member
3) LZ_decompress_write
4) go back to step 3 until LZ_decompress_read returns > 0
now continue with decompression as usual.

You can reposition the stream exactly onto a member boundary, then the
current member still can be decompressed.

Thanks and Regards,
Jacob




reply via email to

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