[xsd-users] Compressing XML file on the fly
Boris Kolpackov
boris at codesynthesis.com
Sun Jul 22 03:26:43 EDT 2007
Hi Thomas,
Thomas Maenner <tmaenner at aehr.com> writes:
> is there a way to write the XML data in memory compressed into a file?
> Rather than write the file and then compress / bzip2 it?
One way would be to use the serialization function that writes to
std::ostream together with a compressing stream from the Boost
Iostreams library:
http://www.boost.org/libs/iostreams/doc/index.html
Alternatively you could customize the ofstream/basic_filebuf to
compress the data before writing it to a file (e.g., by overriding
the overflow() function).
hth,
-boris
More information about the xsd-users
mailing list