Base Library for Easy Decompression
This is Bled, the Base Library for Easy Decompression. It is based almost entirely on the native decompression code found in BusyBox.
It's a library, that can be used in applications to handle the decompression of .Z, .gz, .bz2, .lzma, .xz, .zip compressed files and/or archives.
Because I need this stuff for Rufus, mostly to handle compressed disk images, and nobody outside of BusyBox seems to have put much effort providing a compact, one-size-fits-all Open Source library, for decompressing the most common formats.
As I am very conscious of size in Rufus, and Busybox is targeted at embedded systems, its decompression library seemed like a natural choice. Sure, the 7-Zip LZMA SDK is nice, and compiles nicely on Windows, but it only supports lzma/lzma2/xz (+.7z archives), so you'll need to add stuff like miniz, and then some more, and soon enough you're dealing with multiple APIs and a lot of duplicated code. Plus these libraries also provide compression support, which we don't need, so the whole thing becomes quite large.
GPLv2 or later.
While the BusyBox project as a whole is GPLv2 only, this library is GPLv2
or later, which means it can be used indiscriminately in GPLv2 or GPLv3 projects.
This is possible because the BusyBox sources we used were all explictly tagged GPLv2 or
later and any source that wasn't (libbb.h
, crc32.c
, decompress_unxz.c
) has been
recreated/replaced with versions that are. Also, since we're not using any part of bzlib
there's no additional license notice required. So this really is a pure GPLv2
or later decompression library, for the most common compression formats.
I'm not planning to handle these, because I have no need for tar extraction in Rufus. However, since tar archive handling is present in the BusyBox sources, I may accept a patch if you feel like adding support for it.
Not planning to add support for RAR, unless a truly Free Source (GPL) RAR decompression comes along.
libbb.h
was GPLv2 only, so I had to recreate my own from scratch
that is GPLv2 or later. This was a bit of a pain, so I don't want to bother
recreating a GPLv2+ libbb.h for Linux or other platforms.Either:
Then use the .sln
file or run configure
+ make
.
It is. You should visit Slovenia too, if you ever have a chance.