Skip to content

Commit 27cce22

Browse files
committed
Release 0.4.4
1 parent 38b4aa5 commit 27cce22

4 files changed

Lines changed: 11 additions & 67 deletions

File tree

src/include/otezip/config.h

Lines changed: 8 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,30 @@
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 */
72

83
#ifndef OTEZIP_CONFIG_H
94
#define OTEZIP_CONFIG_H
105

116
#define OTEZIP_VERSION_MAJOR 0
127
#define OTEZIP_VERSION_MINOR 4
13-
#define OTEZIP_VERSION_PATCH 2
8+
#define OTEZIP_VERSION_PATCH 4
149

1510
#define OTEZIP_STRINGIFY(x) #x
1611
#define OTEZIP_TOSTRING(x) OTEZIP_STRINGIFY(x)
1712

1813
#define OTEZIP_VERSION OTEZIP_TOSTRING(OTEZIP_VERSION_MAJOR) "." OTEZIP_TOSTRING(OTEZIP_VERSION_MINOR) "." OTEZIP_TOSTRING(OTEZIP_VERSION_PATCH)
1914

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
2816
#define OTEZIP_ENABLE_STORE 1
29-
30-
/* Include DEFLATE compression (requires zlib) */
3117
#define OTEZIP_ENABLE_DEFLATE 1
32-
33-
/* Include ZSTD compression */
3418
#define OTEZIP_ENABLE_ZSTD 1
35-
36-
/* LZFSE compression support */
3719
#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
4521
#define OTEZIP_ENABLE_LZMA 1
46-
47-
/* Brotli compression support */
4822
#define OTEZIP_ENABLE_BROTLI 1
4923

50-
/* Future algorithms that could be supported */
24+
// ---------------------------------------------- //
5125

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 **
5628
#define OTEZIP_METHOD_STORE 0
5729
#define OTEZIP_METHOD_DEFLATE 8
5830
#define OTEZIP_METHOD_LZMA 14
@@ -62,9 +34,7 @@
6234
/* LZFSE is not officially in ZIP spec, using Apple-specific range */
6335
#define OTEZIP_METHOD_LZFSE 100 /* Apple-specific range */
6436

65-
/*
66-
* Compression buffer sizing constants
67-
*/
37+
// Compression buffer sizing constants
6838
#define OTEZIP_LZMA_HEADER_SIZE 13 /* LZMA header size */
6939
#define OTEZIP_LZMA_OVERHEAD_RATIO 8 /* 1/8 overhead for incompressible data */
7040

src/lib/crc32.inc.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/* CRC-32 polynomial table (reversed) */
2+
// clang-format off
23
static const uint32_t crc32_table[256] = {
34
0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3,
45
0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91,
@@ -33,6 +34,7 @@ static const uint32_t crc32_table[256] = {
3334
0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, 0xcdd70693, 0x54de5729, 0x23d967bf,
3435
0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d
3536
};
37+
// clang-format on
3638

3739
/* Calculate CRC-32 checksum (standard reversed polynomial) */
3840
static uint32_t otezip_crc32(uint32_t crc, const void *buf, size_t len) {

src/lib/otezip.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1429,7 +1429,7 @@ zip_t *zip_open_from_source(zip_source_t *src, int flags, zip_error_t *error) {
14291429
return NULL;
14301430
}
14311431
/* Write the source buffer to the temp file */
1432-
int written = (int) write (fd, src->buf, (unsigned int)src->len);
1432+
int written = (int)write (fd, src->buf, (unsigned int)src->len);
14331433
close (fd);
14341434
if ((int)written != (int)src->len) {
14351435
unlink (tmp_path);

test/manual_test.c

Lines changed: 0 additions & 28 deletions
This file was deleted.

0 commit comments

Comments
 (0)