I want to extract files with FZip.
First i create zip archive with FZip (includeAddler32). I can extract it with 7Zip, all files are correct.
For extraction I tried two approches:
1A) _fzip.load(new URLRequest(_zipFolderPath+fileName))
1B) Load zip file myself with URLLoader (dataFormat = BINARY) and than
_fzip.loadBytes(data) (data is ByteArray)
2) on every FZipEvent.FILE_LOADED event i do
private function fzipFileLoaded(e:FZipEvent):void {
var file:File;
var stream:FileStream;
var fzipFile:FZipFile;
fzipFile = _fzip.removeFileAt(0);
file = new File(_clientFolderPath + fzipFile.filename);
stream = new FileStream();
stream.open(file, FileMode.WRITE);
fzipFile.serialize(stream, true);
stream.close();
}
But extracted files are corrupted. Images cant be open. When you open text file you will see that there are some wierd signs at beggining of file. Rest is corrent
It looks like:
PK vuiLľÔ†P
files_list.txtExample.swf 1757210021 1510222853796
Any idea what's wrong?