Re: Z_SYNC_FLUSH and adding empty blocks after that (_tr_align)
- From: "Mark Adler" <madler@xxxxxxxxxxxxxxxxxx>
- Date: 29 Mar 2007 09:05:42 -0700
On Mar 28, 9:41 pm, byaa...@xxxxxxxxx wrote:
I am trying to add dummy data for a certain number of bytes after I am
done calling deflate.
To do this, I first call deflate with Z_SYNC_FLUSH to ensure it has
ended on a byte boundary.
Good, then that's all you need to do. (You don't need to mess with
the internal zlib routines.) Simply make sure you get all of the
output from deflate, indicated by avail_out not zero, after providing
all of the input. Then you're done with deflate (call deflateEnd() or
deflateReset()).
Now you can append empty blocks as desired. The last empty block
needs to have its last bit set.
Mark
.
- Follow-Ups:
- References:
- Prev by Date: Re: Best Compression Algorithm
- Next by Date: Re: Z_SYNC_FLUSH and adding empty blocks after that (_tr_align)
- Previous by thread: Z_SYNC_FLUSH and adding empty blocks after that (_tr_align)
- Next by thread: Re: Z_SYNC_FLUSH and adding empty blocks after that (_tr_align)
- Index(es):
Relevant Pages
|
|