Here's various links relating to compression, decompression, and archiving in Lua.
- [LibDeflate] (5.1-5.3) - Pure Lua compressor and decompressor with high compression ratio using DEFLATE/zlib format. No dependencies. (Haoqian He)
- [lzlib/lgzip] (5.1) - read/write gzip files. Interface based on Lua io library. Uses zlib [1]. (Tiago Dionizio)
- [lua-zlib] (5.1) - Simple streaming interface to zlib.
- [LuaZip] (5.0/5.1) - lightweight library to read files stored in zip files. Uses zziplib [2]. (Danilo Tuler)
- [lua-zip] (5.1) - Read and write zip files. Uses [libzip].
- [lua-bz2] (5.1) - read bzip2 files. Uses libbzip2. (ThomasHarningJr)
- [LibArchive] (5.1) - Lua binding to libarchive [3], supporting a variety of archiving and compression formas (Brian Maher)
- [LArc] (5.1) - read/write various compressed formats (gzip/bzip2/xv/zip/zip64/tar). Uses zlib/libbzip2/liblzma for core compress/decompress routines in C and higher-level functions in Lua. (Tom Harris)
- [luazen] (5.1+) - A small self-contained library with various compression functions (LZF), encoding functions (base58, base64) and low-grade cryptographic functions (MD5, SHA1, RC4). No dependencies.
- ModuleCompressDeflateLua (5.1) - implementation of DEFLATE (e.g. gzip/zlib) in pure Lua (decompress only). (DavidManura)
- [LibCompress] (5.1) - LZW and Huffman compression/decompression in pure Lua. Can automatically choose the most efficient algorithm for specific data.
- LuaRocks has pure Lua implementations of tar and zip (using lzlib).
-
os.execute
or io.popen
may be used to execute a command directly (e.g. os.execute("unzip foo.zip")
). LuaRocks and LuaDist make use of this.
- [ZipWriter] (5.1/5.2) - Library for creating ZIP archive.
- [zzlib] (5.2/5.3) - zlib-compressed file depacking library in Lua.
- [BriefLZ] (5.1-5.3) - Lua binding for BriefLZ compression library.
For compression by removing whitespace or comments, the following utilities are available:
- [lstrip] (5.1) - A tool for compressing Lua programs by removing comments and whitespace.
- [LuaSrcDiet] (5.1-5.3) - Similar to lstrip, but also able to rename local variables.
- [squish] - Compress and archive Lua code+files [4]. Based on Lua
Src
Diet. Optionally uses ModuleCompressDeflateLua.
Main qualitative characteristics of these libraries include
- Which formats are supported?
- Are read and/or write modes supported? any other limitations?
- What is the core implementation? binding to C library or pure Lua implementation?
Other programming languages cross reference:
RecentChanges · preferences
edit · history
Last edited May 22, 2018 6:56 pm GMT (diff)