Constants
Compression methods
LIBZIP_CM_DEFAULT(-1): Similar toDeflate.LIBZIP_CM_STORE(0): Store the file uncompressed.LIBZIP_CM_SHRINK(1): Shrunk.LIBZIP_CM_REDUCE_1(2): Reduced with factor1.LIBZIP_CM_REDUCE_2(3): Reduced with factor2.LIBZIP_CM_REDUCE_3(4): Reduced with factor3.LIBZIP_CM_REDUCE_4(5): Reduced with factor4.LIBZIP_CM_IMPLODE(6): Imploded.LIBZIP_CM_DEFLATE(8): Deflated.LIBZIP_CM_DEFLATE64(9):Deflate64.LIBZIP_CM_PKWARE_IMPLODE(10):PKWAREimploding.LIBZIP_CM_BZIP2(12): Compressed usingBZIP2algorithmLIBZIP_CM_LZMA(14):LZMA(EFS).LIBZIP_CM_TERSE(18): Compressed usingIBM TERSE(new).LIBZIP_CM_LZ77(19): IBMLZ77z Architecture (PFS).LIBZIP_CM_LZMA2(33)LIBZIP_CM_ZSTD(93):ZSTDcompressed data.LIBZIP_CM_XZ(95):XZcompressed data.LIBZIP_CM_JPEG(96): CompressedJpegdata.LIBZIP_CM_WAVPACK(97):WavPackcompressed data.LIBZIP_CM_PPMD(98):PPMdversionI, Rev1.
Encryption methods
LIBZIP_EM_NONE (0): Not encrypted LIBZIP_EM_TRAD_PKWARE (1): Traditional PKWARE encryption LIBZIP_EM_AES_128 (257): Winzip AES-128 encryption. LIBZIP_EM_AES_192 (258): Winzip AES-192 encryption. LIBZIP_EM_AES_256 (259): Winzip AES-256 encryption.
Open flags
LIBZIP_CREATE(1): Create the archive if it does not exist.LIBZIP_EXCL(2): Error if archive already exists.LIBZIP_CHECKCONS(4): Perform additional stricter consistency checks on the archive, and error if they fail.LIBZIP_TRUNCATE(8): If archive exists, ignore its current contents. In other words, handle it the same way as an empty archive.LIBZIP_RDONLY(16): Open archive in read-only mode.
File info flags
LIBZIP_FL_ENC_GUESS(0): Guess encoding of name (default). (OnlyCP-437andUTF-8are recognized).LIBZIP_FL_NOCASE(1): Ignore case distinctions. (Will only work well if the file names are ASCII.) With this flag, zipnamelocate() will be slow for archives with many files.LIBZIP_FL_NODIR(2): Ignore directory part of file name in archive. With this flag, zipnamelocate() will be slow for archives with many files.LIBZIP_FL_ENC_RAW(64): Compare fname against the unmodified names as they are in the ZIP archive, without converting them toUTF-8.LIBZIP_FL_ENC_STRICT(128): Follow the ZIP specification and expectCP-437encoded names in the ZIP archive (except if they are explicitly marked asUTF-8). Convert them toUTF-8before comparing.LIBZIP_FL_ENC_UTF_8(2048): Interpret name asUTF-8.LIBZIP_FL_ENC_CP437(4096): Interpret name as code page437(CP-437).
Read file flags
LIBZIP_FL_COMPRESSED(4): Read compressed data.LIBZIP_FL_UNCHANGED(8): Use original data, ignoring changes.
Add file flags
LIBZIP_FL_ENC_GUESS(0): Guess encoding of name (default). (OnlyCP-437andUTF-8are recognized).LIBZIP_FL_ENC_UTF_8(2048): Interpret name asUTF-8.LIBZIP_FL_ENC_CP437(4096): Interpret name as code page437(CP-437).LIBZIP_FL_OVERWRITE(8192): If file with name exists, overwrite (replace) it.