A while back I started working on a project called Squash, and today I'm pleased to announce the first release, version 0.5. Squash is an abstraction layer for general-purpose data compression (zlib, LZMA, LZ4, etc.). It is based on dynamically loaded plugins, of which there already a pretty decent number:
- Brotli
- libbsc
- bzip2
- CRUSH
- DENSITY
- Doboz
- FastARI
- FastLZ
- Gipfeli
- LZ4
- LZF
- liblzg
- LZHAM
- LZJB
- liblzma
- LZO
- ms-compress
- pithy
- QuickLZ
- Snappy
- wfLZ
- zlib
- zling
- ZPAQ
- Zstandard
Additionally, a new and greatly improved version of the Squash Benchmark is online. The benchmark includes every compression level for every codec Squash has (except the ones from disabled plugins) on 8 different machines. That's about 40,000 different data points, and I'm planning on adding more machines soon—there will probably be about 14 within the next couple weeks.
The API isn't final yet, but I don't think it will change much—I plan to make some additions, but not changes. I'm rolling out a release now in the hope that it encourages people to give it a try, since I don't want to commit to API stability until a few people have given it a try.
So, why should you care? Well:
- It makes it much easier for people to try more exotic codecs, since they don't need to write new code for each one.
- Squash provides most of the fluff that isn't compression or decompression code, like a buffer to buffer API for codecs with streaming APIs, a command-line interface, I/O handling (including memory-mapped files where appropriate), etc. Very happy to take feature requests here.
- Free bindings to any language Squash supports. Currently this is only C and Vala, but I'm really hoping people come along to write bindings for their favorite language. IMHO bindings are best written by people who really know the target language and its idioms, so this isn't really something I can do on my own for too many languages.
- Inclusion in the Squash Benchmark.
- Pretty good testing of your code. Between the unit tests in Squash and the benchmark I've found a decent number of bugs in several libraries.
I'm very much open to suggestions, questions, flames, etc. I'd prefer you file feature requests or bugs in Squash's issue tracker but here will work, too.