-
-
Notifications
You must be signed in to change notification settings - Fork 114
Home
bit7z is a cross-platform C++ static library that allows the compression/extraction of archive files through a clean and simple wrapper interface to the dynamic libraries from the 7-zip project.
It supports compression and extraction to and from the filesystem or the memory, reading archives metadata, updating existing ones, creating multi-volume archives, operation progress callbacks, and many other functionalities.
- Compression using the following archive formats: 7z, XZ, BZIP2, GZIP, TAR, ZIP, and WIM.
- Extraction of many archive formats: 7z, AR, ARJ, BZIP2, CAB, CHM, CPIO, CramFS, DEB, DMG, EXT, FAT, GPT, GZIP, HFS, HXS, IHEX, ISO, LZH, LZMA, MBR, MSI, NSIS, NTFS, QCOW2, RAR, RAR5, RPM, SquashFS, TAR, UDF, UEFI, VDI, VHD, VMDK, WIM, XAR, XZ, Z, and ZIP.
- Reading metadata of archives and their content.
- Testing archives for errors.
- Updating existing file archives with new files.
- Renaming, updating, or deleting old items in existing file archives.
- Compression and extraction to and from memory and C++ standard streams.
- Compression using custom path aliases for the items in the output archives.
- Selective extraction of only specified files/folders using wildcards and regexes.
- Creation of encrypted archives (strong AES-256 encryption — only for 7z and ZIP formats).
- Archive header encryption (only for 7z format).
- Possibility to choose the compression level (if supported by the archive format), the compression method (supported methods), the dictionary size, and the word size.
- Automatic input archive format detection.
- Solid archives (only for 7z).
- Multi-volume archives.
- Operation callbacks for obtaining real-time information about ongoing operations.
- Canceling or pausing the current operation.
The presence or not of some of the above features depends on the particular shared library used along with bit7z.
For example, 7z.dll should support all these features, 7za.dll should work only with the 7z file format, and 7zxa.dll can only extract 7z files. For more information about the 7-zip DLLs, please see this wiki page.
In the end, some other features (e.g., automatic format detection and selective extraction using regexes) are disabled by default, and macro definitions must be used during compilation to have them available (wiki).
If you have found this project helpful, please consider supporting me with a small donation so that I can keep improving it! Thank you! 🙏
This project is licensed under the terms of the Mozilla Public License v2.0.
For more details, please check:
- The LICENSE file.
- Mozilla's MPL-2.0 FAQ
Older versions (v3.x and earlier) of bit7z were released under the GNU General Public License v2.
Copyright © 2014 - 2024 Riccardo Ostani (@rikyoz)
- Bit7zLibrary
- BitArchiveEditor
- BitArchiveReader
- BitArchiveWriter
- BitException
- BitFileCompressor
- BitFileExtractor
- BitMemCompressor
- BitMemExtractor
- BitStreamCompressor
- BitStreamExtractor
- BitInFormat