Boost logo

Boost Users :

Subject: [Boost-users] troubles with boost filtering streams
From: Daniel Oberhoff (daniel_at_[hidden])
Date: 2011-01-23 09:24:27


Hi,

I am working on a matlab file reader/writer. Since matlab uses zip to
compress variables I was thinking I could use the boost filtering
streams with the zip filter to handle that. The use case is that there
are zipped blocks inside the file, i.e. not the whole file is zipped
but just parts. I am not sure how to handle that with boost, since I
would need to start/stop zipping/unzipping at almost arbitrary points
in the file.

Also I have trouble working with filtering streams at all. As a
baseline test I started substituting the fstream I was reading from
with a boost filtering istream onto which I pushed the fstream. Reading
works fine for a while and then breaks. What I noted is that the
fstream tellg always lags behind the actual number of bytes read. also
using the fitlering streams tellg breaks the whole stream. also seeking
does not seem to work with the filtering stream. I need to seek quite
often. seeking only happens when not unzipping. I tried seeking on the
fstream instead. that worked up to some point(as stated above). I fear
the seeking on the fstream breaks the filtering stream, but seeking on
the filtering stream doesn't work.

If anyone has pointers that would be great.

Best

Daniel


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