- Notifications
You must be signed in to change notification settings - Fork4
Base Library for Easy Decompression
License
pbatard/bled
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This isBled, theBaseLibrary forEasyDecompression. Itis based almost entirely on the native decompression code found inBusyBox.
It's a library, that can be used in applications to handle the decompression of.Z,.gz,.bz2,.lzma,.xz,.zip,.zst compressed files and/orarchives.
Because I need this stuff forRufus, mostly to handle compresseddisk images, and nobody outside ofBusyBox seems to have putmuch effort providing a compact, one-size-fits-all Open Source library, for decompressingthe 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, the7-Zip LZMA SDKis nice, and compiles nicely on Windows, but it only supports lzma/lzma2/xz (+.7z archives),so you'll need to add stuff likeminiz, and then somemore, 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 wholething becomes quite large.
GPLv2or later.
While the BusyBox project as a whole is GPLv2only, this library is GPLv2or 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 orlater and any source that wasn't (libbb.h
,crc32.c
,decompress_unxz.c
) has beenrecreated/replaced with versions that are. Also, since we're not using any part of bzlibthere's no additional license notice required. So this really is apure GPLv2or 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 apatch if you feel like adding support for it.
Not planning to add support for RAR, unless a truly Free Source (GPL) RAR decompressioncomes along.
- Only Windows is supported for now (MinGW/gcc and MSVC). That's because:
- Windows is the only platform I need for Rufus
- The original
libbb.h
was GPLv2only, so I had to recreate my own from scratchthat is GPLv2or later. This was a bit of a pain, so I don't want to botherrecreating a GPLv2+ libbb.h for Linux or other platforms.
- Can't query the uncompressed file size. This is mostly due to the limitation of thecompression formats being used, as most of them are stream formats and do not storethat information anywhere.
- .7z archive extraction is not supported.
- No multithreading and not optimized for speedat all!
- There probably exist limitations with regards to advanced compression and/or newercompression formats.
Either:
- Visual Studio 2022
- MinGW
Then use the.sln
file or runconfigure
+make
.
It is. You should visit Slovenia too, if you ever have a chance.
About
Base Library for Easy Decompression