Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
B

bundle

> 编程语言
Open source

:package: Bundle, an embeddable compression library: DEFLATE, LZMA, LZIP, BZIP2, ZPAQ, LZ4, ZSTD, BROTLI, BSC, CSC, BCM, MCM, ZMOLLY, ZLING, TANGELO, SHRINKER,

691 stars0 likes1 views
WebsiteGitHub

About

:package: Bundle, an embeddable compression library: DEFLATE, LZMA, LZIP, BZIP2, ZPAQ, LZ4, ZSTD, BROTLI, BSC, CSC, BCM, MCM, ZMOLLY, ZLING, TANGELO, SHRINKER,

bundle :package:

Bundle is an embeddable compression library that supports 23 compression algorithms and 2 archive formats.

Distributed in two files.

Features

  • Archive support: .bun, .zip
  • Stream support: DEFLATE, LZMA, LZIP, ZPAQ, LZ4, ZSTD, BROTLI, BSC, CSC, BCM, MCM, ZMOLLY, ZLING, TANGELO, SHRINKER, CRUSH, LZJB, BZIP2 and SHOCO
  • Optimized for highest compression ratios on each compressor, where possible.
  • Optimized for fastest decompression times on each decompressor, where possible.
  • Configurable, redistributable, self-contained, amalgamated and cross-platform (C++03).
  • Optional benchmark infrastructure (C++11).
  • ZLIB/LibPNG licensed.

Bundle stream format

…

Bundle .bun archive format

cpp
- Files/datas are packed into streams by using any compression method (see above)
- Streams are archived into a standard ZIP file:
  - ZIP entry compression is (0) for packed streams and (1-9) for unpacked streams.
  - ZIP entry comment is a serialized JSON of (file) meta-datas (@todo).
- Note: you can mix streams of different algorithms into the very same ZIP archive.

Showcase

…

Build Directives (Licensing)

#define directive Default value Meaning
BUNDLE_NO_APACHE2 (undefined) Define to remove any Apache 2.0 library from build
BUNDLE_NO_BSD2 (undefined) Define to remove any BSD-2 library from build
BUNDLE_NO_BSD3 (undefined) Define to remove any BSD-3 library from build
BUNDLE_NO_CDDL (undefined) Define to remove any CDDL library from build
BUNDLE_NO_GPL (undefined) Define to remove any GPL library from build
BUNDLE_NO_MIT (undefined) Define to remove any MIT library from build
BUNDLE_NO_UNLICENSE (undefined) Define to remove any Public Domain library from build (*)

(*): will disable .bun and .zip archive support as well.

Build Directives (Libraries)

#define directive Default value Meaning
BUNDLE_NO_BCM (undefined) Define to remove BCM library from build
BUNDLE_NO_BROTLI (undefined) Define to remove Brotli library from build
BUNDLE_NO_BSC (undefined) Define to remove LibBsc library from build
BUNDLE_NO_BZIP2 (undefined) Define to remove BZip2 library from build
BUNDLE_NO_CRUSH (undefined) Define to remove CRUSH library from build
BUNDLE_NO_CSC (undefined) Define to remove CSC library from build
BUNDLE_NO_LZ4 (undefined) Define to remove LZ4/LZ4 libraries
BUNDLE_NO_LZIP (undefined) Define to remove EasyLZMA library from build
BUNDLE_NO_LZJB (undefined) Define to remove LZJB library from build
BUNDLE_NO_LZMA (undefined) Define to remove LZMA library from build
BUNDLE_NO_MCM (undefined) Define to remove MCM library from build
BUNDLE_NO_MINIZ (undefined) Define to remove MiniZ library from build (*)
BUNDLE_NO_SHOCO (undefined) Define to remove Shoco library from build
BUNDLE_NO_SHRINKER (undefined) Define to remove Shrinker library from build
BUNDLE_NO_TANGELO (undefined) Define to remove TANGELO library from build
BUNDLE_NO_ZLING (undefined) Define to remove ZLING library from build
BUNDLE_NO_ZMOLLY (undefined) Define to remove ZMOLLY library from build
BUNDLE_NO_ZPAQ (undefined) Define to remove ZPAQ library from build
BUNDLE_NO_ZSTD (undefined) Define to remove ZSTD library from build

(*): will disable .bun and .zip archive support as well.

Build Directives (Other)

#define directive Default value Meaning
BUNDLE_USE_OMP_TIMER (undefined) Define as 1 to use OpenMP timers
BUNDLE_USE_CXX11 (autodetected) Define as 0/1 to disable/enable C++11 features

Licensing table

Software Author(s) License Version Major changes?
bundle r-lyeh ZLIB/LibPNG latest
bcm Ilya Muravyov Public Domain 1.00 istream based now
brotli Jyrki Alakuijala, Zoltan Szabadka Apache 2.0 2015/11/03
bzip2 Julian Seward BSD-4
crush Ilya Muravyov Public Domain 1.00 reentrant fix
csc Siyuan Fu Public Domain 2015/06/16
easylzma Igor Pavlov, Lloyd Hilaiel Public Domain 0.0.7
endian Mathias Panzenböck Public Domain msvc fix
libbsc Ilya Grebnov Apache 2.0 3.1.0
libzling Zhang Li BSD-3 2015/09/16
libzpaq Matt Mahoney Public Domain 7.05
lz4 Yann Collet BSD-2 1.7.1
lzjb Jeff Bonwick CDDL license 2010
mcm Mathieu Chartier GPL 0.84
miniz Rich Geldreich Public Domain v1.15 r.4.1 alignment fix
shoco Christian Schramm MIT 2015/03/16
shrinker Siyuan Fu BSD-3 rev 3
tangelo Matt Mahoney, Jan Ondrus GPL 2.41 reentrant fixes, istream based now
zmolly Zhang Li BSD-3 0.0.1 reentrant and memstream fixes
zstd Yann Collet BSD-2 0.3.2

Evaluated alternatives

FastLZ, FLZP, LibLZF, LZFX, LZHAM, LZLIB, LZO, LZP, SMAZ, Snappy, ZLIB, bzip2, Yappy, CMix, M1

Creating DLLs

bash
cl bundle.cpp -DBUNDLE_API=BUNDLE_API_EXPORT /LD
cl demo.cc -DBUNDLE_API=BUNDLE_API_IMPORT bundle.lib

Changelog

  • v2.1.0 (2017/06/10): C API and DLL bindings; Pump up libcsc; Rename .bnd to .bun
  • v2.0.5 (2016/02/06): Bring back BZIP2 support
  • v2.0.4 (2015/12/04): Add padding support; Fix reentrant CRUSH; Optimizations & fixes
  • v2.0.3 (2015/12/02): Add LZJB and CRUSH; Add BUNDLE_NO_CDDL directive
  • v2.0.2 (2015/11/07): Fix ZMolly segmentation fault (OSX)
  • v2.0.1 (2015/11/04): Fix clang warnings and compilation errors
  • v2.0.0 (2015/11/03): Add BCM, ZLING, MCM, Tangelo, ZMolly, ZSTDf support
  • v2.0.0 (2015/11/03): Change archive format (break change)
  • v2.0.0 (2015/11/03): Disambiguate .bnd/.zip archive handling
  • v2.0.0 (2015/11/03): Fix compilation errors (C++03)
  • v2.0.0 (2015/11/03): Fix missing entries in benchmarks
  • v2.0.0 (2015/11/03): Improve runtime C++ de/initialization stability
  • v2.0.0 (2015/11/03): Optimize archive decompression
  • v2.0.0 (2015/11/03): Remove obsolete enums
  • v2.0.0 (2015/11/03): Upgrade Brotli, ZPAQ, LZ4, ZSTD and Shoco
  • v1.0.2 (2015/10/29): Skip extra copy during archive decompression
  • v1.0.2 (2015/10/29): Add extra archive meta-info
  • v1.0.1 (2015/10/10): Shrink to fit during measures() function
  • v1.0.0 (2015/10/09): Change benchmark API to sort multiples values as well (API break change)
  • v0.9.8 (2015/10/07): Remove confusing bundle::string variant class from API
  • v0.9.7 (2015/10/07): Add license configuration directives
  • v0.9.6 (2015/10/03): Add library configuration directives
  • v0.9.5 (2015/09/28): Add missing prototypes
  • v0.9.5 (2015/09/28): Bugfix helper function
  • v0.9.4 (2015/09/26): Add CSC20 + Shrinker support
  • v0.9.4 (2015/09/26): Rename enums LZ4->LZ4F/LZ4HC->LZ4
  • v0.9.3 (2015/09/25): Add a few missing API calls
  • v0.9.2 (2015/09/22): Pump up Brotli
  • v0.9.2 (2015/09/22): Split BROTLI enum into BROTLI9/11 pair
  • v0.9.1 (2015/05/10): Switch to ZLIB/LibPNG license
  • v0.9.0 (2015/04/08): BSC support
  • v0.8.1 (2015/04/07): Pump up Brotli+ZSTD
  • v0.8.1 (2015/04/07): LZMA20/25 dict
  • v0.8.1 (2015/04/07): Unify FOURCCs
  • v0.8.0 (2015/01/27): ZSTD support
  • v0.8.0 (2015/01/27): Reorder enums
  • v0.8.0 (2015/01/27): Simplify API
  • v0.7.1 (2015/01/26): Fix LZMA
  • v0.7.1 (2015/01/26): Verify DEFLATEs
  • v0.7.1 (2015/01/26): New AUTO enum
  • v0.7.0 (2014/10/22): Brotli support
  • v0.7.0 (2014/10/22): Pump up LZ4
  • v0.6.3 (2014/09/27): Switch to BOOST license
  • v0.6.2 (2014/09/02): Fix 0-byte streams
  • v0.6.2 (2014/09/02): Deflate alignment
  • v0.6.1 (2014/06/30): Safer LZ4 decompression
  • v0.6.1 (2014/06/30): Pump up LZ4 + ZPAQ
  • v0.6.0 (2014/06/26): LZ4HC support
  • v0.6.0 (2014/06/26): Optimize in-place decompression
  • v0.5.0 (2014/06/09): ZPAQ support
  • v0.5.0 (2014/06/09): UBER encoding
  • v0.5.0 (2014/06/09): Fixes
  • v0.4.1 (2014/06/05): Switch to lzmasdk
  • v0.4.0 (2014/05/30): Maximize compression (lzma)
  • v0.3.0 (2014/05/28): Fix alignment (deflate)
  • v0.3.0 (2014/05/28): Change stream header
  • v0.2.1 (2014/05/23): Fix overflow bug
  • v0.2.0 (2014/05/14): Add VLE header
  • v0.2.0 (2014/05/14): Fix vs201x compilation errors
  • v0.1.0 (2014/05/13): Add high-level API
  • v0.1.0 (2014/05/13): Add iOS support
  • v0.0.0 (2014/05/09): Initial commit

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

C++

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言