GitHub release MSVC 2012 - 2019 Architectures Build status License

Supported FeaturesGetting StartedDownloadRequirementsBuildingDonationsLicense


bit7z is a C++ static library which allows to compress and extract many file archive formats, all through a clean, simple and entirely object-oriented interface to the dynamic libraries from the 7-zip project (
It supports compression and extraction to and from the filesystem or the memory, reading of archives metadata, updating existing archives, creation of multi-volume archives, operation progress callbacks and many other functionalities.

Supported Features

Please note that the presence or not of some of the above features depends on the particular .dll used along with bit7z.

For example, the 7z.dll should support all these features, while 7za.dll should support only the 7z file format and the 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 macros defines must be used during compilation to have them available (wiki).

Getting Started (Library Usage)

A complete API reference is available in the wiki section, where you can find also some basic usage examples of bit7z main features.


Github All Releases
Github All Releases

Each released package contains a precompiled version of the library (both in debug and release mode) and the public API headers that are needed to use it in your program; packages are available for both x86 and x64 architectures.

Obviously, you can also clone/download this repository and build the library by yourself (please, see the wiki).


The 7-zip dlls are not shipped with bit7z but they are available at

Note: in order to use this library you should link your program not only with bit7z but also with oleaut32 and user32 (e.g. -lbit7z -loleaut32 -luser32).

Note 2: even if compiled with the latest version of 7-zip, bit7z should work also with the dlls of previous versions, such as v16.04. However, it is strongly suggested to use dlls with the same version.

Note 3: the code has been tested with MSVC 2012, 2015, 2017 and 2019.

Building bit7z

A guide on how to build this library is available here.


If you have found this project useful, please consider supporting it with a small donation or buying me a coffee/beer, so that I can keep improving it! Thank you! :)

Beerpay Buy Me a Coffee at Donations

License (GPL v2)

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
GNU General Public License for more details.

You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

Copyright © 2014 - 2019 Riccardo Ostani (@rikyoz)