Posts Tagged ‘unzip’

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();
}

Airxzip

Airxzip is a library in ActionScript3 (AIR).
Fzip is ActionScript3 library too.
But I have some problems to use it.
So I made “Airxzip”.

Airxzip has following features …

1) Specialize in AIR
It becomes possible for the access to begin at the end of the file ( zip entry infomations ),
It does not to depend on the size of zip file.
So It is able to access information quickly.

2) Async upzip
Airxzip has 2 unzip method. ( unzip() and unzipAsync() )

3) PKWare encrypt/decrypt

4) File attribute ( Zip mode only)
Enable to set file attirbute.
ex) “0700″ “0755″

5) Japanese filename
Mac OS and Unix filename is UTF-8, Windows is Shift_JIS.
And Mac OS UTF-8 and Unix UTF-8 is not same to handle Hankaku-kana.
So AIrxzip resolve these difference automatically.

Project Site

Google Code

Sample codes

Samples

RSS
Add to Google
2012年5月
« 3月    
 12345
6789101112
13141516171819
20212223242526
2728293031