Debian Codegraph @

README.md

raw symbols SCIP
1 # minizip-ng
2
3 minizip-ng is a zip manipulation library written in C that is supported on Windows, macOS, and Linux.
4
5 [![Master Branch Status](https://github.com/zlib-ng/minizip-ng/workflows/Build/badge.svg)](https://github.com/zlib-ng/minizip-ng/actions)
6 [![Fuzzing Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/minizip.svg)](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:minizip)
7 [![License: Zlib](https://img.shields.io/badge/license-zlib-lightgrey.svg)](https://github.com/zlib-ng/minizip-ng/blob/master/LICENSE)
8 [![codecov.io](https://codecov.io/github/zlib-ng/minizip-ng/coverage.svg?branch=develop)](https://codecov.io/github/zlib-ng/minizip-ng/)
9 [![Packaging status](https://repology.org/badge/tiny-repos/minizip-ng.svg)](https://repology.org/project/minizip-ng/versions)
10
11 Developed and maintained by Nathan Moinvaziri.
12
13 ## Branches
14
15 | Name | Description |
16 |:--------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
17 | [develop](https://github.com/zlib-ng/minizip-ng/tree/develop) | Latest development code. |
18 | [master](https://github.com/zlib-ng/minizip-ng/tree/master) | Most recent stable release. |
19 | [1.2](https://github.com/zlib-ng/minizip-ng/tree/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. |
20 | [1.1](https://github.com/zlib-ng/minizip-ng/tree/1.1) | Original minizip as of zlib 1.2.11. |
21
22 ## History
23
24 Minizip was originally developed by [Gilles Vollant](https://www.winimage.com/zLibDll/minizip.html) 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](https://github.com/madler/zlib/tree/master/contrib/minizip) can still be found in the zlib distribution that is maintained by Mark Adler.
25
26 The motivation behind this repository has been the need for new features and bug fixes to the original library which had
27 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.
28
29 ## Features
30
31 + Creating and extracting zip archives.
32 + Adding and removing entries from zip archives.
33 + Read and write raw zip entry data.
34 + Reading and writing zip archives from memory.
35 + Support for large files with ZIP64 extension.
36 + Zlib, BZIP2, LZMA, XZ, and ZSTD compression methods.
37 + Password protection through Traditional PKWARE and [WinZIP AES](https://www.winzip.com/aes_info.htm) encryption.
38 + Buffered streaming for improved I/O performance.
39 + NTFS timestamp support for UTC last modified, last accessed, and creation dates.
40 + Disk split support for splitting zip archives into multiple files.
41 + Preservation of file attributes across file systems.
42 + Follow and store symbolic links.
43 + Unicode filename support through UTF-8 encoding.
44 + Legacy character encoding support CP437, CP932, CP936, CP950.
45 + Turn off compilation of compression, decompression, or encryption.
46 + Windows (Win32 & WinRT), macOS and Linux platform support.
47 + Streaming interface for easy implementation of additional platforms.
48 + Support for Apple's compression library ZLIB and XZ implementations.
49 + Zero out local file header information.
50 + Zip/unzip of central directory to reduce size.
51 + Recover the central directory if it is corrupt or missing.
52 + Example minizip and minigzip command line tools.
53
54 ## Build
55
56 To generate project files for your platform:
57
58 1. [Download and install](https://cmake.org/install/) cmake (version 3.11 or later recommended).
59 2. Run cmake in the minizip directory.
60
61 ```
62 cmake -S . -B build -D MZ_BUILD_TESTS=ON
63 cmake --build build
64 ```
65
66 ## Build Options
67
68 | Name | Description | Default Value |
69 |:--------------------|:---------------------------------------------------------------|:-------------:|
70 | MZ_COMPAT | Enables compatibility layer | ON |
71 | MZ_ZLIB | Enables ZLIB compression | ON |
72 | MZ_BZIP2 | Enables BZIP2 compression | ON |
73 | MZ_LZMA | Enables LZMA & XZ compression | ON |
74 | MZ_ZSTD | Enables ZSTD compression | ON |
75 | MZ_LIBCOMP | Enables Apple compression | APPLE |
76 | MZ_FETCH_LIBS | Enables fetching third-party libraries if not found | WIN32 |
77 | MZ_FORCE_FETCH_LIBS | Enables fetching third-party libraries always | OFF |
78 | MZ_PKCRYPT | Enables PKWARE traditional encryption | ON |
79 | MZ_WZAES | Enables WinZIP AES encryption | ON |
80 | MZ_OPENSSL | Enables OpenSSL encryption | UNIX |
81 | MZ_LIBBSD | Builds with libbsd crypto random | UNIX |
82 | MZ_ICONV | Enables iconv encoding conversion | ON |
83 | MZ_COMPRESS_ONLY | Only support compression | OFF |
84 | MZ_DECOMPRESS_ONLY | Only support decompression | OFF |
85 | MZ_FILE32_API | Builds using posix 32-bit file api | OFF |
86 | MZ_BUILD_TESTS | Builds minizip test executable | OFF |
87 | MZ_BUILD_UNIT_TESTS | Builds minizip unit test project | OFF |
88 | MZ_BUILD_FUZZ_TESTS | Builds minizip fuzz executables | OFF |
89 | MZ_CODE_COVERAGE | Build with code coverage flags | OFF |
90 | MZ_SANITIZER | Build with code sanitizer (Memory, Thread, Address, Undefined) | |
91 | MZ_LIB_SUFFIX | Library name suffix for packaging | |
92
93 ## Third-Party Libraries
94
95 Third-party libraries may be required based on the CMake options selected. If the system already has the library
96 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.
97
98 |Project|License|CMake Option|Comments|
99 |-|-|-|-|
100 [bzip2](https://www.sourceware.org/bzip2/)|[license](https://github.com/zlib-ng/minizip-ng/blob/develop/lib/bzip2/LICENSE)|`MZ_BZIP2`|Written by Julian Seward.|
101 |[liblzma](https://tukaani.org/xz/)|Public domain|`MZ_LZMA`|Written by Igor Pavlov and Lasse Collin.|
102 |[zlib](https://zlib.net/)|zlib|`MZ_ZLIB`|Written by Mark Adler and Jean-loup Gailly. Or alternatively, [zlib-ng](https://github.com/zlib-ng/zlib-ng) by Hans Kristian Rosbach.|
103 |[zstd](https://github.com/facebook/zstd)|[BSD](https://github.com/facebook/zstd/blob/dev/LICENSE)|`MZ_ZSTD`|Written by Facebook.|
104
105 This project uses the zlib [license](LICENSE).
106
107 ## Acknowledgments
108
109 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.
110
111 Thanks to [Gilles Vollant](https://www.winimage.com/zLibDll/minizip.html) on which this work is originally based on.
112
113 The [ZIP format](https://github.com/zlib-ng/minizip-ng/blob/master/doc/zip/appnote.txt) was defined by Phil Katz of PKWARE.