From: Jonathan Turkanis (technews_at_[hidden])
Date: 2004-10-14 10:25:08
"Israel Fdez. Cabrera" <israel_at_[hidden]> wrote in message
> Jonathan Turkanis wrote:
> >The library needs to be cleaned up a lot before I can post it. If there is
> >sufficient interest, I'll try to do it, but it would be at least a couple
> >from now, since I'll be busy trying to get iostreams ready for 1.33.
> There is interest in the library, and I'm sure some other have interest
> too. iostream is a great step ahead in C++, but with this kind of
> support for compressed, OLE files and maybe more, it will be just
> fantastic. It is fantastic to compress and decompress file in just 6
> lines of code dont you think? :)
Yes, but I'm aiming for 4. ;-)
> Let's think I have to use other library, i.e. libgsf from GNU. I have
> the following doubt. I have a single OLE file, I open() it using a
> boost::io stream, how more than one stream can be obtained from a single
> one, taking this OLE file has more than one contained file?
For each type of archive (zip, tar, ole) you have to have a module (an
'archive_handler') that knows the format and can extract the information. The
appropriate handler is called automatically when someone wants to read an entry
for an archive of a particular type. To implement a handler, however, you need
to write code which either completely understands the file format in question or
delegates that responsibility to an outside library.
For OLE compound documents on a windows system, this is simple, since you just
use the functions StgOpenStorageEx, IStorage::EnumElements, etc. On Linux, you
either have to implement everything yourself, or rely on an existing library. I
would assume that such libraries exist. There are also licensing issues to
consider. But again, I don't know much about that.
> The same
> reasoning could be applied to compressed files. How to extract more than
> one compressed file using Iostream.
The zip and tar formats are well-documented and it should be easy to write
handlers for them. Let me repeat, though, that this is a separate project, not
within the scope of the current library.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk