|
1 | | -/* config.h - Configuration options for otezip compression algorithms |
2 | | - * Version: 0.1 (2025-07-27) |
3 | | - * |
4 | | - * This file controls which compression algorithms are included in the otezip build. |
5 | | - * Each algorithm is conditionally compiled based on the defines below. |
6 | | - */ |
| 1 | +/* config.h - Configuration options for otezip */ |
7 | 2 |
|
8 | 3 | #ifndef OTEZIP_CONFIG_H |
9 | 4 | #define OTEZIP_CONFIG_H |
10 | 5 |
|
11 | 6 | #define OTEZIP_VERSION_MAJOR 0 |
12 | 7 | #define OTEZIP_VERSION_MINOR 4 |
13 | | -#define OTEZIP_VERSION_PATCH 2 |
| 8 | +#define OTEZIP_VERSION_PATCH 4 |
14 | 9 |
|
15 | 10 | #define OTEZIP_STRINGIFY(x) #x |
16 | 11 | #define OTEZIP_TOSTRING(x) OTEZIP_STRINGIFY(x) |
17 | 12 |
|
18 | 13 | #define OTEZIP_VERSION OTEZIP_TOSTRING(OTEZIP_VERSION_MAJOR) "." OTEZIP_TOSTRING(OTEZIP_VERSION_MINOR) "." OTEZIP_TOSTRING(OTEZIP_VERSION_PATCH) |
19 | 14 |
|
20 | | -/* |
21 | | - * Compression algorithm selection |
22 | | - * |
23 | | - * Define these to include support for specific algorithms |
24 | | - * Comment out any algorithms you don't want to include |
25 | | - */ |
26 | | - |
27 | | -/* Always include STORE method (uncompressed files) */ |
| 15 | +// Compression algorithm selection |
28 | 16 | #define OTEZIP_ENABLE_STORE 1 |
29 | | - |
30 | | -/* Include DEFLATE compression (requires zlib) */ |
31 | 17 | #define OTEZIP_ENABLE_DEFLATE 1 |
32 | | - |
33 | | -/* Include ZSTD compression */ |
34 | 18 | #define OTEZIP_ENABLE_ZSTD 1 |
35 | | - |
36 | | -/* LZFSE compression support */ |
37 | 19 | #define OTEZIP_ENABLE_LZFSE 1 |
38 | | - |
39 | | -/* LZ4 compression support (using radare2's rlz4.c) */ |
40 | | -/* |
41 | | -#define OTEZIP_ENABLE_LZ4 1 |
42 | | -*/ |
43 | | - |
44 | | -/* LZMA compression support */ |
| 20 | +// #define OTEZIP_ENABLE_LZ4 1 |
45 | 21 | #define OTEZIP_ENABLE_LZMA 1 |
46 | | - |
47 | | -/* Brotli compression support */ |
48 | 22 | #define OTEZIP_ENABLE_BROTLI 1 |
49 | 23 |
|
50 | | -/* Future algorithms that could be supported */ |
| 24 | +// ---------------------------------------------- // |
51 | 25 |
|
52 | | -/* |
53 | | - * Compression algorithm ID numbers (from ZIP spec) |
54 | | - * DO NOT CHANGE - these are standard values |
55 | | - */ |
| 26 | +// Compression algorithm ID numbers (from ZIP spec) |
| 27 | +// ** DO NOT CHANGE - these are standard values ** |
56 | 28 | #define OTEZIP_METHOD_STORE 0 |
57 | 29 | #define OTEZIP_METHOD_DEFLATE 8 |
58 | 30 | #define OTEZIP_METHOD_LZMA 14 |
|
62 | 34 | /* LZFSE is not officially in ZIP spec, using Apple-specific range */ |
63 | 35 | #define OTEZIP_METHOD_LZFSE 100 /* Apple-specific range */ |
64 | 36 |
|
65 | | -/* |
66 | | - * Compression buffer sizing constants |
67 | | - */ |
| 37 | +// Compression buffer sizing constants |
68 | 38 | #define OTEZIP_LZMA_HEADER_SIZE 13 /* LZMA header size */ |
69 | 39 | #define OTEZIP_LZMA_OVERHEAD_RATIO 8 /* 1/8 overhead for incompressible data */ |
70 | 40 |
|
|
0 commit comments