[Unity5, 2017,2018, 2019 ready] 7zip decompression, lzma alone, zip/gzip, LZ4, fastLZ & brotli compression/decompression native library for Android, iOS*, Windows, OSX, Linux & webGL** has been released on the asset store. https://assetstore.unity.com/packag...z-zip-gzip-brotli-multiplatform-plugins-12674 * ZIP plugin: iOS/tvOS compilation may require to add the -lz linking flag at Build Settings-> Linking-> Other Linker flags on xcode. **webGL supports flz,lzma & lz4 buffers compression/decompression only. It also supports all the zip functions except those that require file system access. If you are publishing for MacOS on the AppStore please do the following to codesign the bundle: 1. Remove all the meta files from inside the .bundle. 2. Remove (if any) folder named CodeSignature. 3. Find the Info.plist file and change the bundleID to one of your own. FEATURES: 7ZIP section: [it is recommended to work with non solid 7z archives because they are getting processed faster!] The library serves the scope to have fast decompression of 7z files and compress/decompress lzma files and buffers. - The library does 7z decompression and not 7z compression. Compression of lzma alone files is supported. Passwords are not supported. - It is about 2.5x times faster then using a c# implementation for 7z decompression. - You can extract a single file out of the 7z archive. - If you intend to decompress large files it would be better to use the largeFiles flag.(consumes less ram) - You can extract the contents of the 7z file keeping its folder structure. - Ability to get the filenames and file sizes of files in a 7z archive. - Ability to encode/decode to/from .lzma alone format. - Ability to decode a specific file in a 7z archive to a byte buffer. - get byte level progress of 7z decompression (single or multiple files). - get byte level progress of lzma compression/decompression. - Ability to decode/encode a byte buffer to/from the lzma alone format. - Ability to cancel 7zip extraction when it contains multiple entries. ZIP / gzip section: Fast zip/gzip/tar/bz2 compression and decompression with a clean and simple interface. Very easy to use. Well commented example and documentation. The plugin is about 7x times faster in compression speed and 3x times faster in decompression speed compared to SharpZipLib. - compress/decompress buffers to/from zlib/gzip streams. - recursive directory compression/decompression. - compress/decompress single files. - encryption / decryption. - append files to existing zip archives. - compress a buffer and write it or append it to a zip archive. - get file and size info of all the files or a specific file from a zip archive. - extract a single file out of a zip archive. - decompress a file of a zip archive to a byte buffer. - delete an entry in a zip archive. - replace an entry in a zip archive. - get progress of extraction when the zip archive has multiple files. - get byte level progress of compression/decompression (single or multiple files). - create in Memory zip files and manipulate them from there. - Support of split zip files compress/decompress (1.zip. 1.z01, 1.z02, ...) - decompression of split zip archives (in the form of 1.zip, 1.z01, 1.z02, ...) - ability to discover merged/hidden zip/gzip archives in files or buffers and extract from there. - bz2/zlib compression-decompression methods. (bz2 method not available for MacOS/iOS/tvOS & webGL) - buffers can be treated as files. That means if you have a file in www.bytes you can perform operations directly on the buffer. - support for STORE method when setting level of compression to zero. - ability to cancel most zip/unzip operations when they are called from a Thread. - create/decompress gzip files. - ability to create tar archives from directories or list of files with byte level progress. - untar and untar entry support with byte level progress. - compress/decompress of tar.gz, tar.bz2 with progress. - create and decompress bz2 archives with progress. - thread safe LZ4 section: Fast compression/decompression of files in LZ4 format. - compress a file into a LZ4 file format. - decompress an LZ4 file. - compress a buffer into the LZ4 format. - decompress an LZ4 compressed buffer into a buffer. - progress of operations. (The plugin provides a solution to store the uncompressed size of a compressed buffer in its footer.) fastLZ section: Fast compression/decompression of files in fastLZ format. - compress a file into a fastlz file format. - decompress a fastlz file. - compress a buffer into the fastlz format. - decompress a fastlz compressed buffer into a buffer. - progress of operations. (The plugin provides a solution to store the uncompressed size of a compressed buffer in its footer.) brotli section: Fast brotli compression and decompression with a clean and simple interface. Very easy to use. - compress a file into a brotli file format. - decompress a brotli file. - compress a buffer into the brotli format. - decompress a brotli compressed buffer into a buffer. (The plugin provides a solution to store the uncompressed size of a compressed buffer in its footer.) *Linux, iOS, Android, MacOSX can treat buffers as files. (On Windows the zip plugin can treat buffers as files as well.) The ios and OSX libraries are compiled as universal. That means that they will support 32 and 64 bit builds. The Windows and Linux libraries are compiled for x86 and x86_64 build modes. The Android lib is compiled for arm64-v8a, armeabi-v7a and x86. iOS/tvOS plugins are standard bitcode enabled. If you are using a non bitcode project please use the appropriate plugins that reside in the non-bitcode folders. If you want to get only the zip plugin it is also sold separately here: https://www.assetstore.unity3d.com/en/#!/content/39411 -------------------------------------------------------------------------------------------------- version 2.7 [Major update] - 7ZIP: Added byte level progress for 7zip extraction (whole files/fileBuffers or entries) - 7ZIP: Added byte level progress for lzma alone creation/decompression. - 7ZIP: For this reason 3 new functions have been introduced. See examples and docs. - 7ZIP: Improved entry search and extraction speed. - 7ZIP: Fixed an issue with entries extraction, where some unwanted empty folders could be extracted. - 7ZIP: Decompress buffer imporoved. - 7ZIP: Fixed issues with files larger then 2GB on 64bit systems. - 7ZIP: Linux: reintroduced FileBuffers for Linux. - 7ZIP: Protection against illegal characters in 7z entries. - 7ZIP: The get7zInfo and get7zSize functions run faster and no more a temp log is needed. - LZ4: Progress of decompression is a ulong now. - ZIP: Added support for tar/untar. - ZIP: Added support for tar.gz, tar.bz2 creation. - ZIP: Protection against illegal characters in entries. - ZIP: Added ability to create and decompress bz2 files. - ZIP: Faster reaction to the cancel command. - ZIP: Fixed gzip file decompression issues. - ZIP: gzip uncompress progress relies on the compressed files size now. - ALL: tvOS uses the same functions as WebGL now, since it does not allow access to the file system. - ALL: Combined tvOS and WebGL in one demo scene. (WebGL sample scenes renamed to reflect the above changes.) - ALL: Updated and refactored the demo scene and scripts to reflect the new changes. - ALL: Removed the Streaming Assets folder files. All example files are downloaded now. - ALL:LINUX: Only one glibc version of Linux plugins now provided (glibc2.17) In general, a lot more has been done to improve the stability and usability of the plugins. update version 2.6.3 - Brotli: Fixed the buffer functions. Spoiler: Older updates Update version 2.6.2 - 7zip: Windows: Unicode issues resolved. - 7zip: Added a cancel function when decompressing 7zip archives with multiple entries. - 7zip: Linux: FileBuffers disabled for now on Linux since they are not stable. - ZIP: Hotfix: the previous update broke the decompression of zip file. It is now fixed! - ZIP: Added 2 new functions to gzip and ungzip archives on the File System. update version 2.6.1 - ZIP: Hot fix for zips that contain the __MACOSX folder. - ZIP: Added simulator plugin for iOS. update version 2.6 (ZIP: Important feature and maintenance update) - ZIP: Setting level of compression to zero will now use the STORE method. - ZIP: Added the setCancel() function to cancel the compress_File, compressDir, compress_File_List, decompress_File, extract_entry, entry2Buffer functions. - ZIP: Added the ability to get byte level progress when compressing files. - ZIP: Android arm64-v8a plugin should decompress files larger then 2GB now. - ZIP: Windows: compression with unicode characters in path should work correct now. - ZIP: The getEntrySize function returns a ulong value now. - ZIP: The getFileInfo function filled Lists for uncompressed, compressed and localOffset are filled with UInt64 values now. - ZIP: The getFileInfo function fills a new list localOffset. Useful for archives with the STORE method to find the position in the zip. (you should add + 30 bytes + name.length to get the final offset) - ZIP: Demo script updated to reflect the new changes. - 7zip: When extracting a 7z archive the output folder should be created when not existing now. update version 2.58 - ZIP: fixed WebGL issues on Unity 2019.x - fixed ios/tvos issue with bitcode plugins on xcode 11.x - Lzma/7zip: fixed issue with the windows plugins. Now bcj and ppmd are back. The ios/tvos plugins include xcode 10.3 and 11.4 bitcode compiled versions. update version 2.57 - ZIP: Process of decompression in bytes now returned as ulong. - ZIP: Fixed an issue with ios/tvOS caused by the 1.64 update. update version 2.56 - ZIP: Hotfix for the compressDir/compress_File_List functions. The plugin could crash when thousands of files were going to get compressed. update version 2.55 - ZIP: Using compress_File/compress_File_List/compressDir to append multiple files to a zip were very slow. Now compress_File_List and compressDir work very fast. - ZIP: For the same reason the inMemory class got some low level functions to allow much faster appending of multiple entries. See examples and docs. update version 2.54 - ZIP: Critical fix for the inMemory zip creation functions. All users that use these functions should update to this version. - ZIP: Added a public function to the inMemory struct for getting the byte buffer of the inMemory created zip. update version 2.53 [Major update] - ZIP: WebGL has now full zip support. Obviously not on the file system but on memory buffers. (bz2 method not supported yet.) - ZIP: Webgl got zlib buffer support again. (Was misplaced in a previous update.) - ZIP: Added the ability to find merged/hidden zip/gzip archives in files or buffers and extract/get info from them. - ZIP: iOS/tvOS: fixed potential issues with admob/facebook/google sdk. - ZIP: Windows/Android: fixed bz2 issue. - ZIP: bz2 method support for inmemory compression. (not for macos/ios/tvos/webgl.) - All Plugins-tvOS: fixed preprocessor issues on newer versions of Unity. - plugin binary sizes got smaller. - updated the benchmark script. update version 2.52 - ZIP: fixed some C# issues with the compress_dir and compress_file_list functions. update version 2.51 - ZIP: iOS/tvOS: fixed duplicate symbol issue with Unity2018. update version 2.50 - ZIP: iOS/tvOS: fixed some conflict issues with the Facebook SDK. update version 2.49 - tvOS plugins were accidentally not provided as bitcode by default. update version 2.48 - tvOS has its own plugin folder now. - iOS/tvOS plugins are provided by default as bitcode enabled. (non bitcode versions are still provided.) version 2.47 - 7z/lzma: fixed some issues with the windows plugins. - ZIP: Added the ability to create In Memory zip archives and manipulate them. - MacOS: removed the 32bit only bundle. - Replaced the www functions with UnityWebRequest. - Removed the watchOS plugins. - Docs updated. update version 2.46 - LZMA/Windows x86/Il2cpp: fixed a crash issue. update version 2.45 - Android arm64 plugins for brotli, flz, lz4 & 7zip updated to fix a crash when using FileBuffers. update version 2.44 - ZIP: buffer2File fix. (was adding modified time field when it was not needed.) - Added Linux glibc 2.17 version plugins (useful for SteamOS). update version 2.43 - ZIP: Fixed some preprocessor directives. update version 2.42 - ZIP: Added the ability to create split zip archives. - ZIP: Fixed an issue with the iOS bitcode enabled plugin. update version 2.4 - Addded arm64-v8a Android support for all plugins. - Removed WSA support for all plugins. - Separated the plugin folders for each category. - MacOS plugins compiled only for 64 bit now. - ZIP: Resolved some il2cpp issues. - ZIP: Unicode filenames on decompression should work now on Windows. - LZ4/WebGL compress buffer fix. update version 2.32 - ZIP: Hotfix for password encoded zip files not creating folders. - ZIP: Hotfix for the compressDir function. update version 2.31 - ZIP: Added the entry2FixedBuffer function to decompress an entry to a fixed size buffer. - ZIP: The getFileInfo is now much faster on zip archives with thousands of files. update version 2.30 - ZIP: Added the getEntryDateTime function, to get DateTime for a specific entry - Updated the file sample links of the demos, due to a server switch. update version 2.29 - ZIP: Removed encryption/decryption for WSA due to certification reasons. update version 2.28.2 - ZIP: iOS/MacOS Hotfix. - ZIP: bz2 method removed for MacOS/iOS/watchOS/tvOS because it is not working correctly. update version 2.28 [Major zip plugin update] - Zip: Added Encryption/Decryption support. - Zip: Added bz2 as an alternative compression/decompression method of zip archives. - Zip: WSA supports now FileBuffers. - Zip: On WSA encryption is supported only on UWP10 x64. - Zip: Better Unicode support on Windows platforms. - Zip: Faster and more reliable getInfo function. (intermediate file is not used anymore.) - Zip: Low level functions have been removed due to inconsistency between platforms. - Zip: Added the ability to compress a list of files into a single archive. update version 2.27 - Added webGL LZ4 support for compression / decompression of buffers. update version 2.26 - Reintroduced webGL support for zip/gzip, flz and lzma compression/decompression of buffers. update version 2.25 - Zip: hotfix for zip files which use backslashes instead of slashes for directories - Zip: Linux/MacOS fixes for the low level functions on standalone builds. - Zip/ios: watchOS & tvOS. Added simulator plugins. update version 2.24 - Zip: Added zip64 support. - Zip: Added low level functions (except for WSA) - see demo and lzip.cs. - Zip: WSA8.1 fixes. - Zip: Added a setEncoding function for Windows and WSA10 to set text encoding on file names. - Zip: Added a validate function to check sanity of zip files. - Zip: The getTotalFiles will now return only the true files number (no folders and no zero byte files). - All plugins: Removed WebGL support since it is almost impossible to work on Unity5.5. update version 2.21 - fix for a WSA/x86/il2cpp crash. update version 2.2 Removed WebGL support for the LZ4 plugin since there are too many conflicts with Unity5.5. If you have the LZ4 WebGL plugin in your project and you are on Unity5.5 you are advised to removed it. version 2.19 zip/All platforms: added the delete_entry function to delete an entry in a zip file. zip/All platforms: added the replace_entry function to replace an entry in a zip file(from a filepath or a buffer). version 2.18 iOS/zip/bitcode: removed older version of bitcode compiled lib which was missing the new ungzip function. version 2.17 zip/Windows: A small fix to the getTotalFiles function to allow to work correctly with FileBuffers. update version 2.16 ZIP All Platforms-gzip: Fixed a bug that was introduced in a previous update that had to with the outbuffer length. Now the gzip functions behave as intended. ZIP Windows: Now you can treat a zip file that is loaded in a byte buffer as a file. ZIP ios/gzip: updated the gzip functions. update version 2.15 Linux: fixed preprocessor directives for Unity5.4.x and up. update version 2.14 gzip: Fixed Android issues and added a 2nd ungzip function. update version 2.13 zip/Windows: better unicode support. Unity5.4 compatibility fix. update version 2.12 lzma: fixed a bug with lzma compression. (lzma compression on already compressed files would produce corrupted lzma files.) update version 2.11 zip/iOS: hotfix to fix a GcHandle crash. LZ4: added compress buffer to a specific location of a fixed size buffer. LZ4: added decompress an lz4 buffer from a specific location of a fixed size buffer version 2.1 (Major update) - Added Brotli support for all platforms except WebGL & watchOS. - zip: added gzip support. Can operate on buffers with or without headers/footers. - zip: added progress for individual file decompression. - Android, Linux, iOS, MacOSX got chmod support to set file permissions. - iOS: made the plugins much smaller in size. - Reorganized the demo folders. You are adviced to delete the demo folders before updating the sample scenes. update version 2.09 - Added bitcode supported plugins for iOS. update version 2.08 - Compatibility fixes for Windows Phone 8.1 and WSA8.1. Sdk8.1 should work out of the box now without the need to provide your own IO functions. - Added a benchmark scene. Update version 2.06 - Winx86, Winx86_64 & WSA plugins: full unicode support on paths and filenames. Update version 2.05 (important update) - progress functions are the same on all platforms now. That introduced a small breaking code change. Instead of providing a referenced integer or float you provide a single item integer of float array. Removed deprecated iOS functions to get progress. - iOS: renamed some native functions to avoid collision with unity's libiphone lib. - lzma: added a function to decompress a compressed Asset Bundle (lzma format/ lz4 format under investigation). - lzma: added an example on how to decompress a compressed asset bundle from the StreamingAssets Folder. - zip: fixed an issue with decompressing of zip files conataining the '__MACOSX' folder. The '__MACOSX' folder will be ignored along with files starting with '._' and files with 0 bytes size. version 2.0 (Major update) - Added WebGL support for all plugins! - Linux, iOS, Android, MacOSX can treat now buffers as files. That means if you have a file in www.bytes you can perform operations directly on the buffer. For Android this is very useful since you can decompress from Streaming Assets without copying to Persistent data path. - all plugins/all platforms: added support for fixed buffer operations to avoid memory allocations. - lzma: added support for partial buffer compression. - lzma: added the ability to modify the compression properties for buffers and lzma alone files. - refactored the preprocessor directives to comply with Unity 5.3. - iOS: simulator plugins have now universal, i386 and x86_64 variations. version 1.9.1 - added fastLZ support. - added LZ4 buffer compression level. version 1.9 - Added LZ4 support. (Read the dedicated documentation for it.) - Discontinued Blackberry support. - Minor improvements for the lzma plugins. - WSA10: Accidentally in the previous update the largeFiles support for 7z files was removed. Now it is back in. - added a folder with the plugins separated as unitypackage files. Update version 1.8 - iOS: added tvOS, watchOS and simulator plugins. - Unity5.2: added WSA SDK10 NetCore support. version 1.7.6 - 7zip iOS: fixed a bug in the get7zInfo function when extracting from the StreamingAssets folder. - zip iOS : updated the ios plugins to have minimum iOS support 6.0 update version 1.7.5 - removed vc++2013 dependency for windows editor. - zip/7zip iOS: added extra workaroud functions to get the progress of files when extracting multiple files in multiple threads. See documentation! update version 1.7.4 - 7zip iOS: added an extra function to get properly the progress of the extracted files. - 7zip iOS: now you can use the largeFiles flag when decompressing a file that is stored in StreamingAssets to some other folder with writing permissions. - zip: - added 2 global integers zipFiles & zipFolders that get updated when calling the getFileInfo function. update version 1.7.3 - Fix for the CompressDir function for the zip plugin. - Total true files in a 7zip file are counted now when calling the get7zInfo function and stored in the trueTotalFiles integer variable. update version 1.7.21 - Hotfix for iOS. Issue was conflicting functions between the zip and 7zip plugin. update version 1.7.1 - cleaned up 7z/lzma cs files. - added a second method on 7zip decompression for not forcing the user to use a ref int to get the extraction progress when not needed/wanted. update version 1.7 MAJOR UPDATE: - Added full ZIP support (see apropriate documentation for more). In short, compression/decompression of files/directories and buffers is supported on all platforms. - Changed the way how the decompression progress of archives with multiple files is returned. Now you have to provide a referenced integer where the progress will be written to. This was done to avoid shared memory violations when having multiple threads calling the same function. - Progress works now for Linux and Win8.1 (Phone and WSA) - Removed some obsolete functions and revamped the code. - Added an example for Android, to copy a file from the StreamingAssets folder to the PersistantDataPath and do there file operations. The zip package will be sold also as a cheaper single package. update 10/06/2015 version 1.6.2 - critical bug fixed in the 7z decode2Buffer function that caused a crash. Works as expected now. update 02/06/2015 version 1.6.1 - cleaned up the cs code. Less preprocessor directives used now. - updated Blackberry plugin. Added x86 binary. update 30/05/2015 version 1.6 Major update: -Ability to compress a buffer to the lzma format and to decompres a buffer that is in the lzma format. -Added basic support for Windows Phone 8.1 and WSA plugins. -Added a method to get the current number of files extracted from a 7z archive. Provides a solution to get progress of decompression when the 7z archive has multiple files. - Fixed a bug in the Linux plugin where folders where not created correctly. More details in the documenation. update 16/05/2015 version 1.5.8 Added ppmd decompression method support. update 28/04/2015 version 1.5.7 Adressed memory leak issues and changed the get7zInfo and get7zSize functions. It is recomended to use this version if you are calling the above functions on 7z archives that contain hundreds or thousands of files. update 19/02/2015 version 1.5.5 Added the ability to decode a specific file in a 7z archive to a byte buffer. update 03/02/2015 version 1.5 Added the ability to get filename and file size information of a 7z archive. Added the ability to encode/decode to/from .lzma alone format. The 1.4.5 version is included also zipped in case somebody wants to use the basic functionality of the lib because the newer versions have grown in size. update 28/01/2015 version 1.4.5 Experimental Blackberry support added. update 22/01/2015 version 1.4 Added OSX and Linux support. update 12/12/2014 Added support for x86 and x86_64 Windows. A macOS version might come in the future. Removed crc checks on android and ios builds for faster extraction. update 10/12/2014 version 1.2.5 Added support for x86 Android builds. Changed the folder structure of the Plugins/Android folder. Now the plugins for each platform reside in their own folder named after the platform. You don't have to do anything. Unity will copy the correct lib for you wether you build for arm, x86 or both (fat binary). update: 12/11/2014 version 1.2.1 - By mistake in the previous version the iOS library was the Debug one. - 3 compiled versions of the library are now included. Debug, Fast and Small, Agrresive optimizations (faster and bigger) (the variations are included as zip files in the plugins/iOS folder. Unzip the one you want to use) Default is: Fast and Small update: 12/11/2014 Added iOS support.