read zip file addon

hello everyone,

i want to read a zip file.
like unzipit library for P5

anyone an answer?


as far as i know, there is no zip library especially made for OF. But there are loads of libraries available for c++. The most famous is probably zlib
But you can find some more over here:…-pplication…–available

But those are not that easy to use. Maybe, if you only have to unzip or zip some files and are on mac or linux, you could also look at the command line application “unzip” or “zip”. You can call these commands from your openframeworks application. I may have the code somewehere on how to do a command line call if you need it.


i didn’t have enough time to get zlib working so i came up with another solution using a shell script which is called from OF and does all the unzipping.

for each zip file, i create a new folder which i name with the current timestamp.
i then use ofDirectory to check when the folder is created.
once created, i can assume the current files have been unzipped.
and i then go onto unzipping the remaining files in the folder using the same process.

007 source code below,



I just posted this for future reference:

one function that unzips a file to a specified destination

thx Marek,
works great.

one thing i needed to do is wrap with the zip file path with ofToDataPath();
perhaps this could be done automatically inside the ofxUnZip() function.