This is continuation of previous thread in my quest for getting something to read the zipped folders I have but since the methodology is different I decided to start a new thread.
I installed boost and ran a couple of example programs but this one which could have saved my day is not working:
Also, be aware that gzip is not the same thing as zip. gzip is a compression format used on the Internet for data transfer under the HTTP/1.1 protocol. zip is an archiving format for multiple files which may or may not be compressed.
Also, be aware that gzip is not the same thing as zip. gzip is a compression format used on the Internet for data transfer under the HTTP/1.1 protocol. zip is an archiving format for multiple files which may or may not be compressed.
Mike
So, you mean boost is not suitable in reading .zip files?
So, you mean boost is not suitable in reading .zip files?
It is "suitable". The question is do you have a zip decompressor class that is compatible with the boost iostreams library?
Look at your code -- what makes it uncompress gzip files? Is it the boost::iostreams itself, or is it that gzip_decompressor()? It is the latter, and it's that plug-in that needs to be written or found somewhere. The boost::iostreams library is based on sources and sinks. In this case, the "source" would be a zipped file, and the "sink" is the uncompressed file.
So nothing stops boost::iostreams from decompressing zip files -- the issue is that do you have the "plug-in" to do it, if not, can you write one based on the "source" and "sink" paradigm?
Regards,
Paul McKenzie
Last edited by Paul McKenzie; December 1st, 2011 at 09:00 PM.
So, you mean boost is not suitable in reading .zip files?
Based on the sample code from the boost library (which mentions the file extension of .gz meaning gzip), and based on the name of the boost function gzip_decompressor(), I would say "no", the boost library is useless for decompression of .zip files
Based on the sample code from the boost library (which uses the file extension of .gz meaning gzip), and based on the name of the boost function gzip_decompressor(), I would say "no", the boost library is useless for decompression of .zip files
Well, it isn't useless unless you write the decompressor that can be plugged into the boost::iostreams classes. Maybe someone has done it, I don't know. But it looks like the boost-iostreams authors left that as "homework" for someone else to do.
So, you mean boost is not suitable in reading .zip files?
Learned,
There are libraries that clearly state they read (and write) .zip archives and files, so if you see "gzip" as the only format it reads and not "zip", it isn't going to work, period.
Some of these zip libraries are free (InfoZip), while others, you have to pay for since they do much more. Please do a google search for these libraries.
Some of these zip libraries are free (InfoZip), while others, you have to pay for since they do much more. Please do a google search for these libraries.
Learned - InfoZip is a good tip and a good find, and the suggestion to Google for other libraries is also a good one.
In addition, the latest version of the Windows SDK (?? I'm not completely sure of this -- the documentation is a bit vague and perhaps it's only available on a server development SDK??) exposes "Compression API Functions", see http://msdn.microsoft.com/en-us/library/hh437556.aspx
Originally Posted by MSDN
The native Compression API includes the following functions.
Bookmarks