Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Base Library for Easy Decompression

License

NotificationsYou must be signed in to change notification settings

pbatard/bled

Repository files navigation

What's this then?

This isBled, theBaseLibrary forEasyDecompression. Itis based almost entirely on the native decompression code found inBusyBox.

What's it for?

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.

Why are you doing that?

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.

What's the license?

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.

What about compressed tar archives?

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.

What about .rar?

Not planning to add support for RAR, unless a truly Free Source (GPL) RAR decompressioncomes along.

Are there any limitations?

  • Only Windows is supported for now (MinGW/gcc and MSVC). That's because:
    • Windows is the only platform I need for Rufus
    • The originallibbb.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.

Alright I'm sold. What do I need?

Either:

  • Visual Studio 2022
  • MinGW

Then use the.sln file or runconfigure +make.

Is the name a reference toBled, Slovenia?

It is. You should visit Slovenia too, if you ever have a chance.


[8]ページ先頭

©2009-2025 Movatter.jp