[haXe] Making a .zip file

Nicolas Cannasse ncannasse at motion-twin.com
Thu Aug 17 14:10:16 CEST 2006


> Hi,
> 
> How do I make a .zip file using the haXe API?
> 
> I can see that I can make a zipped block using neko.zip.Compress.run(s :
> String, compressionLevel : Int) : String, but how do I turn that into a
> full zip-archive with filenames and so on?
> 
> I see that neko.zip.File.read( data : String) reads a full zip-file, but
> I need the opposite of this - something like:
> 
>     neko.zip.File.write(List<{ filename: String, data : String }>);

There is currently no support for it, so you'll have to write it
yourself. This is a bit more difficult than what neko.zip.File.read is
doing since you need to produce valid informations while 'read' is just
skipping the infos it doesn't need.

You can read the file format specification there :

http://www.pkware.com/business_and_developers/developer/appnote/

In case you write it, I'll review and integrate it into the standard
haXe distribution.

Best,

Nicolas



More information about the Haxe mailing list