[PD] zip archives

Mathieu Bouchard matju at artengine.ca
Thu Jun 16 21:52:53 CEST 2011


On Thu, 16 Jun 2011, Cody Loyd wrote:

> can PD access files that are found in a ZIP archive? if so.. HOW?

You can use a webpage such as 
http://en.wikipedia.org/wiki/ZIP_%28file_format%29 to figure out what you 
need to do to access the files that you want. This only tells you how to 
read directories and access the file data as-is. It's easy as long as the 
data is not compressed.

JAR files, for examples, are ZIP files in which compression is disabled. 
This makes them easier to read.

If you need to decode Deflated files (normal ZIP2 compression used in ZIP 
files since 1993), that's much harder, but I think that it is something 
supported by zlib (or else it's very close to be supported by zlib).

For non-compressed zip archives, you may be able to do it all in Pd using 
either GridFlow's [#in grid, headerless] or using Martin Peach's 
file-reading tools, together with the usual Pd toolset ([sel], [moses], 
etc).

For compressed data, the easiest might be to use Shell-commands with 
either a shell-oriented PKUNZIP.EXE (Windows), or else using InfoZip's 
/usr/bin/unzip command (Linux or OSX).

I don't know of a direct Pd interface to zlib (alias libz).

  _______________________________________________________________________
| Mathieu Bouchard ---- tél: +1.514.383.3801 ---- Villeray, Montréal, QC


More information about the Pd-list mailing list