Boost Users :
Subject: Re: [Boost-users] [Iterator] Interest in bzip2 compress/decompress iterators
From: Jason Felice (jason.m.felice_at_[hidden])
Date: 2009-12-28 12:00:48
2009/12/28 Boris DuÅ¡ek <boris.dusek_at_[hidden]>:
> I haven't tried it, but what would prevent one from using
> std::istreambuf_iterator and std::ostreambuf_iterator on an gzip/bzip2
> filtering streambuf created with boost.iostreams?
> On Mon, Dec 28, 2009 at 5:05 PM, Jason Felice <jason.m.felice_at_[hidden]> wrote:
>> I noticed there's a gzip iostream, but no gzip iterator. Â This is a
>> kind of precedent for the external dependency aspect.
First, I didn't see that there was a bzip2 filtering streambuf, though
that might be because this code is currently stuck on boost 1.34.1
(for at least the next couple months).
Second, I've not used the filtering streambufs, but I assumed they
must decorate another streambuf. Seems a lot of extra machinery for
what I was doing. I was very happy about my solution being very well
abstracted such that the unit tests verified this stuff without
hitting the disk. I used back_inserter<vector<char> > as the output
I suppose you could do all that with stringstreams' buffer, but
iterator-to-iterator seems like the simplest and most generic place to
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