本帖最后由 破晓 于 2015-4-8 15:50 编辑
ANE7zAdobe AIR iOS Native Extension to decompres 7z files. Uses a slightly modified verion of lzmaSDK https://github.com/mdejong/lzmaSDK
Features:- Decompress 7z ( Sync/Async )
- Decompress single file from 7z to disc ( Sync/Async )
Todo- Add working example
- Get list of 7z contents before uncompress
- Add compression methods
ANE7z static Methods- decompress(source : File, destination : File) : Array;
复制代码 Synchronously decompress the source file in to destination folder.If folder don't exist it will be created- decompressAsync(source : File, destination : File) : void;
复制代码 Asynchronously decompress the source file in to destination folder.If folder don't exist it will be created.Dispatches ANE7zEvent.UN7Z_START when the process starts.Dispatches ANE7zEvent.UN7Z_END when the process ends.Dispatches ANE7zEvent.UN7Z_PROGRESS each time a file in the 7z is decompressed.
event.eventData will contain:
* current -> current index of decompressed file
* total -> total files to decompress inside zip - [code]extractEntry(source : File, destination : File, entry : String) : Boolean;
复制代码
Synchronously extracts a single file from "source" named "entry" to the destination file.Return true if extraction was done correctly- extractEntryAsync(source : File, destination : File, entry : String) : void;
复制代码 Asynchronously extracts a single file from "source" named "entry" to the destination file.Dispatches ANE7zEvent.UN7Z_ENTRY_START when the process starts.Dispatches ANE7zEvent.UN7Z_ENTRY_END when the process ends.
event.eventData will contain:
* success -> if extraction was done correctly
相关链接:
https://github.com/xperiments/ANE7z
|