Available SDKs
LZMA SDK
Public domain C/C++ compression library
7z Format
Complete 7z format specification
DLL Integration
Use 7-Zip DLLs in your application
Source Code
Full source code on GitHub
LZMA SDK
The LZMA SDK is a public domain compression library:- License: Public domain (no restrictions)
- Languages: C, C++, C#, Java
- Formats: LZMA, LZMA2, XZ
- Size: Minimal footprint (~50 KB)
- Download: 7-zip.org/sdk.html
7z ANSI-C Decoder
Simplified C decoder for 7z archives: Files (fromDOC/7zC.txt):
7zDec.c- Low level 7z decoding7zArcIn.c- Archive opening7z.h- Main header file7zTypes.h- Type definitions
- Reads 7z archives
- Extracts files
- Tests integrity
- Lists contents
- LZMA and Copy methods supported
7-Zip DLLs
7-Zip provides COM-based DLLs for Windows:Available DLLs
Location:
CPP/7zip/Bundles/Format7zF/
API Interfaces
IInArchive
For reading archives:IOutArchive
For creating archives:Memory Allocation
7-Zip uses custom allocators:Compression API
LZMA Encoder
LZMA Decoder
Return Codes
From7zTypes.h (lines 40-60):
Building the SDK
Windows
Linux/macOS
Example Applications
The SDK includes example programs:C/Util/7z/7zMain.c- 7z archive decoderC/Util/Lzma/LzmaUtil.c- LZMA compression utilityC/Util/LzmaLib/LzmaLibExports.c- DLL exports
Integration Examples
Compress File in Memory
Extract 7z Archive
Documentation Files
DOC/7zC.txt- 7z ANSI-C decoder documentationDOC/7zFormat.txt- 7z format specificationDOC/lzma.txt- LZMA algorithm descriptionDOC/Methods.txt- Compression method IDs
License
FromDOC/7zC.txt:
7z ANSI-C Decoder is part of the LZMA SDK. LZMA SDK is written and placed in the public domain by Igor Pavlov.
The LZMA SDK is public domain - you can use it freely in any project without restrictions or attribution requirements.