var zipReader:ZipFileReader = new ZipFileReader();
zipReader.addEventListener(ZipEvent.ZIP_DATA_UNCOMPRESS,uncompressData);
zipReader.open(file);
var entries:Array = zipReader.getEntries();
for(var i:int = 0; i<entries.length; i++){
     var entry:ZipEntry = entries[i] as ZipEntry;
     zipReader.unzipAsync(entry);
}

sample unzipAsync event handler
( save file )

private function uncompressData(e:ZipEvent):void{
    var entry:ZipEntry = e.entry;
    var file:File = dir.resolvePath(entry.getFilename());
    var fs:FileStream = new FileStream();
    fs.open(file,FileMode.WRITE);
    fs.writeBytes(e.data);
    fs.close();
}

Related Posts

2 Responses to “airxzip: how to use unzipAsync() method”

  • Don Mitchinson より:

    Hi there:
    Just wanted to send a note to thank you for your efforts at creating these unique projects.
    Do you have any source code that you can send for airxmail and airxzip?
    I’d lobe to be able to include variations in my own projects.

    Thanks
    Don Mitchinson
    Calgary, Alberta Canada

  • coltware より:

    Hi Don

    Thank you for comment.

    >Do you have any source code that you can send for airxmail and airxzip?
    I can’t catch the meaning.
    Sorry.. I’m not good at English.

    You means you want to see my AIR software code that I used airxmail or airxmail.
    For example..
    You want to see my GravityMail code.

    Gravity Mail is AIR mail client software.
    http://flex.coltware.com/air-gravity-mail/

    Or…
    You means you want to see other my sample code for airxmail or airxzip.

    If you don’t want to write on this blog,
    Please send me e-mail.

    Regards

Leave a Reply

Spam protection by WP Captcha-Free

RSS
Add to Google
2011年5月
« 4月   7月 »
1234567
891011121314
15161718192021
22232425262728
293031