extracting compressed file with boost::iostreams

Pieter Hoste picture Pieter Hoste · Jul 27, 2009 · Viewed 8.3k times · Source

I'm searching for a way to extract a file in c++ by using the boost::iostreams classes.

There is an example in the boost documentation. But it outputs the content of the compressed file to std::cout. I'm looking for a way to extract it to a file structure.

Does anybody know how to do that?

Thanks!

Answer

Jeff Hardy picture Jeff Hardy · Jul 27, 2009

Boost.IOStreams does not support compressed archives, just single compressed files. If you want to extract a .zip or .tar file to a directory tree, you'll need to use a different library.