forked from zlib-ng/minizip-ng
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmz.h
More file actions
77 lines (63 loc) · 2.51 KB
/
Copy pathmz.h
File metadata and controls
77 lines (63 loc) · 2.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
/* mz.h -- Errors codes, zip flags and magic
Version 2.0.1, October 16th, 2017
part of the MiniZip project
Copyright (C) 2012-2017 Nathan Moinvaziri
https://github.com/nmoinvaz/minizip
Copyright (C) 1998-2010 Gilles Vollant
http://www.winimage.com/zLibDll/minizip.html
This program is distributed under the terms of the same license as zlib.
See the accompanying LICENSE file for the full text of the license.
*/
#ifndef _MZ_H
#define _MZ_H
#ifdef __cplusplus
extern "C" {
#endif
/***************************************************************************/
// MZ_ERROR
#define MZ_OK (0)
#define MZ_EOF (MZ_OK)
#define MZ_STREAM_ERROR (-1)
#define MZ_DATA_ERROR (-3)
#define MZ_MEM_ERROR (-4)
#define MZ_END_OF_LIST (-100)
#define MZ_PARAM_ERROR (-102)
#define MZ_FORMAT_ERROR (-103)
#define MZ_INTERNAL_ERROR (-104)
#define MZ_CRC_ERROR (-105)
#define MZ_CRYPT_ERROR (-106)
#define MZ_EXIST_ERROR (-107)
// MZ_COMPRESS_METHOD
#define MZ_COMPRESS_METHOD_RAW (0)
#define MZ_COMPRESS_METHOD_DEFLATE (8)
#define MZ_COMPRESS_METHOD_BZIP2 (12)
#define MZ_COMPRESS_METHOD_LZMA (14)
// MZ_COMPRESS_OPTIONS
#define MZ_COMPRESS_LEVEL_DEFAULT (-1)
#define MZ_COMPRESS_WINDOW_BITS_DEFAULT (0)
#define MZ_COMPRESS_MEM_LEVEL_DEFAULT (0)
#define MZ_COMPRESS_STRATEGY_DEFAULT (-1)
// MZ_ZIP_FLAG
#define MZ_ZIP_FLAG_ENCRYPTED (1 << 0)
#define MZ_ZIP_FLAG_LZMA_EOS_MARKER (1 << 1)
#define MZ_ZIP_FLAG_DEFLATE_MAX (1 << 1)
#define MZ_ZIP_FLAG_DEFLATE_NORMAL (0)
#define MZ_ZIP_FLAG_DEFLATE_FAST (1 << 2)
#define MZ_ZIP_FLAG_DEFLATE_SUPER_FAST (MZ_ZIP_FLAG_DEFLATE_FAST | \
MZ_ZIP_FLAG_DEFLATE_MAX)
#define MZ_ZIP_FLAG_DATA_DESCRIPTOR (1 << 3)
// MZ_ZIP_MAGIC
#define MZ_ZIP_MAGIC_DISKHEADER (0x08074b50)
#define MZ_ZIP_MAGIC_LOCALHEADER (0x04034b50)
#define MZ_ZIP_MAGIC_CENTRALHEADER (0x02014b50)
#define MZ_ZIP_MAGIC_ENDHEADER (0x06054b50)
#define MZ_ZIP_MAGIC_ENDHEADER64 (0x06064b50)
#define MZ_ZIP_MAGIC_ENDLOCHEADER64 (0x07064b50)
#define MZ_ZIP_MAGIC_DATADESCRIPTOR (0x08074b50)
// MZ_VERSION
#define MZ_VERSION ("2.0.1")
/***************************************************************************/
#ifdef __cplusplus
}
#endif
#endif