[Top][All Lists]

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

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

From: Jacob Rief
Subject: [Lzip-bug] Restarting an lzip member at any time
Date: Mon, 7 Dec 2009 19:11:29 +0100

Hello Antonio, hello list,

The documentation says: Use LZ_compress_restart_member to start a new
member, in a multimember data stream. Call this function only after
`LZ_compress_member_finished' indicates that the current member has
been fully read (with the `LZ_compress_read' function).

I wanted to know how to flush all data to the lzip-stream and enforce
the encoder to start with a new member. LZ_compress_sync_flush does
not work here, because no synchronization data and no dictionary is
written. LZ_compress_restart_member() can only be called after
LZ_compress_member_finished() returned true. 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?

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.

Regards, Jacob

reply via email to

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