lzip-bug
[Top][All Lists]
Advanced

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

Re: [Lzip-bug] Restarting an lzip member at any time


From: Antonio Diaz Diaz
Subject: Re: [Lzip-bug] Restarting an lzip member at any time
Date: Tue, 08 Dec 2009 20:58:59 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.7.11) Gecko/20050905

Hello Jacob,

Jacob Rief wrote:
As far as I understand, restarting a member is the same as
concatenating two lzip streams. So the only solution I see, is to
LZ_compress_finish()/LZ_compress_close() and to restart with
LZ_compress_open()/LZ_compress_write(), but this approach seems weird.
Isn't there any nicer solution?

There are two nicer solutions (I have to explain this better in next version of the manual): 1) Give a member size to LZ_compress_open(). Then, every time LZ_compress_member_finished returns 1, call LZ_compress_restart_member.

2) Every time you want to start a new member, call LZ_compress_finish() and continue reading until LZ_compress_member_finished returns 1. Then call LZ_compress_restart_member (without closing the stream).


The problem is, that I want to restart a member at a certain boundary,
because it makes life much easier when starting to read in the middle
of a stream. If do a normal multi member compression, I have no
control at which position a new member is restarted.

Take into account that perfect control is not possible because it is not possible to determine the exact size of a member in advance.


Regards,
Antonio.




reply via email to

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