Zlib question : using Z_FULL_FLUSH to build random access index into compressed data



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
.



Relevant Pages

  • Re: Effective Lossy Compression of Bitstream
    ... | I want to compress lossy this bitstring, ... you want to generate a sequence such that the conditional ... How many bits per chunk of data stream? ...
    (comp.compression)
  • Re: How to compress data into fixed chunks?
    ... I am trying to compress data into fixed chunks with chunk size equal ... to 1MB using deflate algorithm, ...
    (comp.compression)
  • Re: Partitioned decompression
    ... clients in a P2P way, so, clients requests chunks of this file to the ... this chunk is requested by other peer, ... and compress them for transmission. ...
    (comp.compression)
  • deflate fastest in 32K chunks?
    ... I have noticed that, to compress a block of 1MB data, it is faster to ... do it in 32KB chunks than in a 1MB chunk. ... deflateInit(), deflateand deflateEndfunctions to ... main concern (as long as I still get decent compression ratio). ...
    (comp.compression)
  • Problem writing compressed data to disk
    ... fun to compress a text file and write it to a disk file. ... Create a DeflateStream by wrapping up a MemoryStream. ... Write the compressed data into the underline stream (the ... Call the MemoryStream's Write method to dump the compressed data ...
    (microsoft.public.dotnet.languages.csharp)