Bundling 7z.dll with Proprietary Software
Bundling the 7z.dll library with proprietary software is
legally permissible, but it requires strict adherence to open-source
licensing conditions. Because 7-Zip and its dynamic link libraries are
primarily distributed under the GNU Lesser General Public License
(LGPL), developers can link against the binary without being forced to
open-source their own proprietary code. However, commercial vendors must
still fulfill specific obligations regarding source code availability,
attribution, dynamic linking mechanics, and sub-module restrictions.
The Governing License: GNU LGPL
The core of 7-Zip, including the compiled 7z.dll, is
distributed under the GNU LGPL (typically LGPL version 2.1 or later),
with some portions covered by the BSD 3-Clause license or public domain
dedications.
Unlike the standard GNU General Public License (GPL), the LGPL allows a library to be utilized by non-GPL and proprietary programs. However, it explicitly protects the freedom of the library itself.
Requirements for Bundling
7z.dll
To remain compliant while packaging 7z.dll alongside
closed-source software, you must meet the following obligations:
Maintain Dynamic Linking Keep
7z.dllas a distinct, dynamically linked file. Do not statically link the 7-Zip source code directly into your proprietary executable. The LGPL requires that end users have the technical ability to replace or upgrade7z.dllwith a custom or modified version of their own without breaking compatibility or being blocked by anti-tamper mechanisms.Provide Source Code for the Library You are not required to disclose your application's proprietary source code, but you must provide access to the source code of
7z.dll.- If you made any modifications to
7z.dll, you must distribute those modified source files under the LGPL. - If you use the unmodified binary, you must either include the corresponding 7-Zip source archive with your distribution or provide a written offer valid for at least three years (or a direct, stable download link) directing users to the exact source code corresponding to the version you shipped.
- If you made any modifications to
Include Copyright and License Notices You must include proper attribution in your software documentation, about box, or legal notices. This includes:
- A clear statement that your application utilizes the 7-Zip library.
- A reference to Igor Pavlov as the author/copyright holder.
- A prominent notice stating that
7z.dllis licensed under the GNU LGPL. - A full copy of the LGPL license text included with your installer or software package.
Beware of the unRAR Restriction
Certain builds of 7-Zip include code to decompress RAR archives. The
unRAR portion is governed by a distinct license from Eugene Roshal,
which contains an explicit restriction: the code may not be used or
reverse-engineered to re-create the RAR compression algorithm. If your
version of 7z.dll incorporates unRAR capabilities, ensure
that your application does not violate this specific restriction, or
build a custom version of 7z.dll with RAR support
explicitly disabled.