I am wondering with cinder (boost) would be complicated to zip an entire folder with .csv, .aiff and .mp4 files on it. I’m planning to do an automated uploader to a online repository of my data, but need to zip the files to upload them.
Thanks for the suggestions
Caveat: never tried it myself.
Cinder comes with the
zlib library, so you should be able to use the methods defined in there to compress and decompress files. For general info, see their docs.
Buffer class has methods that make use of
decompressBuffer. If you first read a file into the buffer, then compress and write it, you should have a proper ZIP file.
Ok thanks for the answer, just another question, zlib allows me to compress an entire folder with files on it? Somehow reading the examples it only makes references to a single file compressed. Don’t see any method to add files to the compressed result.
Does this need to happen in runtime cplusplus? It would probably take 3 lines of bash or 10 lines of python to do this. Is there a reason you need to use cinder?
Ryanbartley, you are totally right, and actually it seems to be not trivial on c++. The reason is because I’m currently working on a small team that is developing an app that record audio, sensors among other; great part of the app is done already on C++, trying not to build a parallel standalone.