Boost logo

Boost :

From: Jonathan Turkanis (technews_at_[hidden])
Date: 2004-10-13 10:41:29

"Israel Fdez. Cabrera" <israel_at_[hidden]> wrote in message
> Hi, I'm working with the boost's IOStream library adding
> compression/decompression methods others than zip, gzip and bzip2.

Great! Please note that the officially released version will contain some small
changes to the interfaces.

> working too adding support to OLE Compound Documents to the same
> library, I'd like to "extract" a containt


> OLE Document using boost::io
> stream interface.
> The problem is I'm not sure how to "return or extract" more than one
> document or compressed file from a stream.

If I understand you correctly, with the current library you need to use the COM
interface to get an instance of IStream which can then be easily wrapped as a
seekable resource.

> All boost examples
> boost::io::copy() a whole stream to another but not just part of it.
> I'll appreciate any help, best regards and thank you for such a helpful

I wrote another library with direct support for hierarchical filesystems such as
zip files or OLE Compound Documents. A modified version might be a candidate for
includion in Boost at some future date. I haven't looked at it in a while, but I
believe it supported the following usage:

     datastream io("ole:C:/file.ole!/directory/hello_word.txt, mode);

     // Write to the file with path "/directory/hello_world.txt"
     // in the OLE compound document "C:/file.ole".
     io << ...

You could also create an archive object and iterate through it.

    archive ar("ole", "C:/file.ole");
    for (archive::iterator it = ar.begin(); ... )

> Israel



> _______________________________________________
> Unsubscribe & other changes:

Boost list run by bdawes at, gregod at, cpdaniel at, john at