No description
Find a file
2024-11-01 16:13:37 -07:00
.github Only setup python when codecov is enabled. 2024-06-07 19:27:28 -07:00
cmake Fixed zstd master branch no longer working. 2024-04-01 09:44:11 -07:00
compat Split compat layer into different source files #806 2024-10-30 18:11:27 -04:00
doc Remove left over signing code from v3. 2024-02-16 18:32:53 -08:00
test Split compat layer into different source files #806 2024-10-30 18:11:27 -04:00
.clang-format Adopting a clang-format based on Google style 2024-11-01 16:13:37 -07:00
.codecov.yaml Added code coverage yaml configuration. 2023-01-15 10:43:41 -08:00
.gitignore Change third-party directory to third_party. 2023-04-24 10:28:54 -07:00
CMakeLists.txt Split compat layer into different source files #806 2024-10-30 18:11:27 -04:00
INDEX.md Added license information to third-party libraries section. 2020-06-20 09:37:47 -07:00
LICENSE minor URL correction, remove EOL spaces, add EOF newlines. 2019-09-15 20:11:28 +00:00
minigzip.c Remove first param from create functions. 2023-04-09 11:14:26 -07:00
minizip.c Fixed listing empty zip file. #756 2024-06-01 14:09:47 -07:00
minizip.pc.cmakein Fix pkgconfig file for private dependencies 2023-09-12 12:05:12 -07:00
mz.h Version 4.0.7. 2024-06-15 09:21:44 -07:00
mz_crypt.c Remove first param from create functions. 2023-04-09 11:14:26 -07:00
mz_crypt.h Support AAD in AES-GCM 2023-05-05 13:53:16 -04:00
mz_crypt_apple.c Added MZ_TARGET_APPSTORE to hide GSM private api on macOS 2024-10-23 11:28:07 -07:00
mz_crypt_openssl.c Implicit conversion loses integer precision: 'unsigned long' to 'int32_t' 2024-10-31 11:38:23 -07:00
mz_crypt_winvista.c Prevent uninitialized warning for key_size variable in clang. 2023-05-26 11:29:31 -07:00
mz_crypt_winxp.c Support AAD in AES-GCM 2023-05-05 13:53:16 -04:00
mz_os.c Check for zero length path in mz_path_has_slash 2023-11-13 09:38:50 -08:00
mz_os.h mz_os.h - fix indentation; mz_os_win32.c - adjust for utf8 strings to be represented by char*; test_encoding.cc - remove useless cast 2023-06-08 11:25:14 -07:00
mz_os_posix.c Adjust mz_os_utf8_string_create to return char*, and mz_os_utf8_string_delete to take a char** 2023-06-08 11:25:14 -07:00
mz_os_win32.c Update comments style in various code files 2023-12-29 07:04:22 -08:00
mz_strm.c Remove first param from create functions. 2023-04-09 11:14:26 -07:00
mz_strm.h Remove first param from create functions. 2023-04-09 11:14:26 -07:00
mz_strm_buf.c Remove first param from create functions. 2023-04-09 11:14:26 -07:00
mz_strm_buf.h Remove first param from create functions. 2023-04-09 11:14:26 -07:00
mz_strm_bzip.c Silence -Wunused-but-set-variable warnings 2023-12-18 10:13:55 -08:00
mz_strm_bzip.h Remove first param from create functions. 2023-04-09 11:14:26 -07:00
mz_strm_libcomp.c Variable 'total_in' set but not used 2024-10-31 14:37:14 -04:00
mz_strm_libcomp.h Remove first param from create functions. 2023-04-09 11:14:26 -07:00
mz_strm_lzma.c Match default compression level value in compress streams #726 2023-10-26 11:51:43 -07:00
mz_strm_lzma.h Remove first param from create functions. 2023-04-09 11:14:26 -07:00
mz_strm_mem.c Remove first param from create functions. 2023-04-09 11:14:26 -07:00
mz_strm_mem.h Remove first param from create functions. 2023-04-09 11:14:26 -07:00
mz_strm_os.h Remove first param from create functions. 2023-04-09 11:14:26 -07:00
mz_strm_os_posix.c Remove first param from create functions. 2023-04-09 11:14:26 -07:00
mz_strm_os_win32.c Fixed missing defines on older versions of Windows after bcrypt change. 2023-04-19 09:15:06 -07:00
mz_strm_pkcrypt.c Check version when verifying password for pkcrypt. #800 2024-10-18 12:01:40 -07:00
mz_strm_pkcrypt.h Check version when verifying password for pkcrypt. #800 2024-10-18 12:01:40 -07:00
mz_strm_split.c Fixed disk spanning failures due to changes in #799. 2024-10-30 13:01:47 -04:00
mz_strm_split.h Remove first param from create functions. 2023-04-09 11:14:26 -07:00
mz_strm_wzaes.c Support AAD in AES-GCM 2023-05-05 13:53:16 -04:00
mz_strm_wzaes.h Added optional support for AES CBC mode to mz_crypt_aes. 2023-04-17 14:32:06 -07:00
mz_strm_zlib.c The value is never actually read from 'zlib' 2024-11-01 16:13:37 -07:00
mz_strm_zlib.h Remove first param from create functions. 2023-04-09 11:14:26 -07:00
mz_strm_zstd.c Silence -Wunused-but-set-variable warnings 2023-12-18 10:13:55 -08:00
mz_strm_zstd.h Remove first param from create functions. 2023-04-09 11:14:26 -07:00
mz_zip.c Split compat layer into different source files #806 2024-10-30 18:11:27 -04:00
mz_zip.h Split compat layer into different source files #806 2024-10-30 18:11:27 -04:00
mz_zip_rw.c Value stored to 'err' is never read 2024-11-01 16:13:36 -07:00
mz_zip_rw.h Remove first param from create functions. 2023-04-09 11:14:26 -07:00
README.md Reorder branches in readme after making develop default branch. 2024-06-01 16:46:30 -07:00

minizip-ng

minizip-ng is a zip manipulation library written in C that is supported on Windows, macOS, and Linux.

Master Branch Status Fuzzing Status License: Zlib codecov.io Packaging status

Developed and maintained by Nathan Moinvaziri.

Branches

Name Description
develop Latest development code.
master Most recent stable release.
1.2 Old changes to original minizip that includes WinZip AES encryption, disk splitting, I/O buffering and some additional fixes. Not ABI compatible with original minizip.
1.1 Original minizip as of zlib 1.2.11.

History

Minizip was originally developed by Gilles Vollant in 1998. It was first included in the zlib distribution as an additional code contribution starting in zlib 1.1.2. Since that time, it has been continually improved upon and contributed to by many people. The original project can still be found in the zlib distribution that is maintained by Mark Adler.

The motivation behind this repository has been the need for new features and bug fixes to the original library which had not been maintained for a long period of time. The code has been largely refactored and rewritten in order to help improve maintainability and readability. A compatibility layer has been provided for consumers of the original minizip library.

Features

  • Creating and extracting zip archives.
  • Adding and removing entries from zip archives.
  • Read and write raw zip entry data.
  • Reading and writing zip archives from memory.
  • Support for large files with ZIP64 extension.
  • Zlib, BZIP2, LZMA, XZ, and ZSTD compression methods.
  • Password protection through Traditional PKWARE and WinZIP AES encryption.
  • Buffered streaming for improved I/O performance.
  • NTFS timestamp support for UTC last modified, last accessed, and creation dates.
  • Disk split support for splitting zip archives into multiple files.
  • Preservation of file attributes across file systems.
  • Follow and store symbolic links.
  • Unicode filename support through UTF-8 encoding.
  • Legacy character encoding support CP437, CP932, CP936, CP950.
  • Turn off compilation of compression, decompression, or encryption.
  • Windows (Win32 & WinRT), macOS and Linux platform support.
  • Streaming interface for easy implementation of additional platforms.
  • Support for Apple's compression library ZLIB and XZ implementations.
  • Zero out local file header information.
  • Zip/unzip of central directory to reduce size.
  • Recover the central directory if it is corrupt or missing.
  • Example minizip and minigzip command line tools.

Build

To generate project files for your platform:

  1. Download and install cmake (version 3.11 or later recommended).
  2. Run cmake in the minizip directory.
cmake -S . -B build -D MZ_BUILD_TESTS=ON
cmake --build build

Build Options

Name Description Default Value
MZ_COMPAT Enables compatibility layer ON
MZ_ZLIB Enables ZLIB compression ON
MZ_BZIP2 Enables BZIP2 compression ON
MZ_LZMA Enables LZMA & XZ compression ON
MZ_ZSTD Enables ZSTD compression ON
MZ_LIBCOMP Enables Apple compression APPLE
MZ_FETCH_LIBS Enables fetching third-party libraries if not found WIN32
MZ_FORCE_FETCH_LIBS Enables fetching third-party libraries always OFF
MZ_PKCRYPT Enables PKWARE traditional encryption ON
MZ_WZAES Enables WinZIP AES encryption ON
MZ_OPENSSL Enables OpenSSL encryption UNIX
MZ_LIBBSD Builds with libbsd crypto random UNIX
MZ_ICONV Enables iconv encoding conversion ON
MZ_COMPRESS_ONLY Only support compression OFF
MZ_DECOMPRESS_ONLY Only support decompression OFF
MZ_FILE32_API Builds using posix 32-bit file api OFF
MZ_BUILD_TESTS Builds minizip test executable OFF
MZ_BUILD_UNIT_TESTS Builds minizip unit test project OFF
MZ_BUILD_FUZZ_TESTS Builds minizip fuzz executables OFF
MZ_CODE_COVERAGE Build with code coverage flags OFF
MZ_SANITIZER Build with code sanitizer (Memory, Thread, Address, Undefined)
MZ_LIB_SUFFIX Library name suffix for packaging

Third-Party Libraries

Third-party libraries may be required based on the CMake options selected. If the system already has the library installed then it will be used, otherwise CMake will retrieve the source code for the library from its official git repository and compile it in when the MZ_FETCH_LIBS option is enabled.

Project License CMake Option Comments
bzip2 license MZ_BZIP2 Written by Julian Seward.
liblzma Public domain MZ_LZMA Written by Igor Pavlov and Lasse Collin.
zlib zlib MZ_ZLIB Written by Mark Adler and Jean-loup Gailly. Or alternatively, zlib-ng by Hans Kristian Rosbach.
zstd BSD MZ_ZSTD Written by Facebook.

This project uses the zlib license.

Acknowledgments

Thanks go out to all the people who have taken the time to contribute code reviews, testing and/or patches. This project would not have been as good without you.

Thanks to Gilles Vollant on which this work is originally based on.

The ZIP format was defined by Phil Katz of PKWARE.