Zlib question : using Z_FULL_FLUSH to build random access index into compressed data
- From: Qubeley <lianghancn@xxxxxxxxx>
- Date: Thu, 10 Jul 2008 09:36:15 -0700 (PDT)
I am using ZLIB Z_FULL_FLUSH mode to build random access index in the
compressed data. I split input data into fixed size chunks and
compress each chunk separately using the same zstream with the flush
parameter set to Z_FULL_FLUSH mode. I expect to get byte aligned
compressed blocks so I can record the offset of blocks and directly
jump desired block during decompression, w/o touching previous
blocks.
My problem is this indexing sometimes work, sometimes not. For
example, I could observe a bit pattern in compressed data sometimes
that the presence of "0000 FFFF" trailer near end of the block which
was said to be a trait (is it?) for a compressed block. If this bit
pattern exhibits, then my index will work. Otherwise, the index will
not working : though I can decompress some bits starting from the
index but I can not get the complete original block (with size equal
to the fixed chunk size).
I am hoping if someone here would shed some lights, thanks
.
- Follow-Ups:
- Prev by Date: Re: An analysis of the counting argument.
- Next by Date: Re: Zlib question : using Z_FULL_FLUSH to build random access index into compressed data
- Previous by thread: Please recomend on a compression
- Next by thread: Re: Zlib question : using Z_FULL_FLUSH to build random access index into compressed data
- Index(es):
Relevant Pages
|