zerkman / zzlib

zlib-compressed file depacking library in Lua
Do What The F*ck You Want To Public License
86 stars 21 forks source link

Reading ZIP format? #2

Closed jirutka closed 4 years ago

jirutka commented 7 years ago

Could you please add support for reading ZIP format?

zerkman commented 7 years ago

ZIP is more like a collection of container formats than a single standard format. ZIP files may contain data in DEFLATE-compressed format but also in other formats such as bzip2 or lzma. Several incompatible encryption methods have been also implemented. As such, ZIP is not a standard. A simple version with only support for the original PKZIP format and DEFLATE streams could be implemented without too much effort. I’ll see what I can do :)

jirutka commented 7 years ago

I know, with support for ZIP I mean specifically ZIP with DEFLATE-compressed streams, without any encryption or zip64, i.e. the variant that is mostly used nowadays.

I’ve tried to find some lightweight C library for just reading/decompressing ZIP with DEFLATE streams, but all I found are quite big and bloated libraries. :(

zerkman commented 7 years ago

Just pushed a commit implementing very basic ZIP support. It supports the extraction of files in DEFLATE and non-compressed formats. Also checks CRC32.