Boost logo

Boost Users :

Subject: Re: [Boost-users] [iostreams] gzip problem
From: Nat Goodspeed (nat_at_[hidden])
Date: 2014-02-21 10:26:51


On Feb 21, 2014, at 5:00 AM, Olaf Krzikalla <olaf.krzikalla_at_[hidden]> wrote:

> I have a file format containing chunks of gzipped data (using gzip_decompressor/gzip_compressor). Inbetween these chunks there is other (plain) data. So can keep the archive seekable. However apparently this doesn't work out as it should. Whenever gzip_decompressor reaches the end of a chunk it throws an exception.
>
> after the footer is read and checked, the decompressor checks whether or not eof is reached. Obvisiously this isn't the case here - the decompressed chunk is just embedded in the file. Thus the decompressor restarts, but cannot find another header thus throwing an exception.

Could you wrap the input stream in a filter that would pass through only the chunk, pretending to its consumer that the chunk is the entire stream?


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net