[minizip-ng] Cherry-pick a slight memory optimization for 64-bit systems.

Slightly reduces struct size by getting rid of padding.

Not including the mz_crypt_openssl.c change because it doesn't apply here.
This commit is contained in:
David Korth 2025-03-29 12:21:23 -04:00
parent 7f3bda3238
commit d5e2b8266f
3 changed files with 9 additions and 4 deletions

View File

@ -23,6 +23,11 @@ The following changes have been made to the original:
- project(): Disabled DESCRIPTION and HOMEPAGE_URL due to requiring
newer versions of CMake than what's available in Ubuntu 16.04.
- Commit e6eeb4ea520915a762d2c317d0a7ad552a89de04 has been cherry-picked
from the develop branch. This commit slightly reduces memory usage on
64-bit systems. (not including the mz_crypt_openssl.c change because
it doesn't apply here)
To obtain the original minizip-ng 4.0.7, visit:
https://github.com/zlib-ng/minizip-ng

View File

@ -23,16 +23,16 @@
/***************************************************************************/
typedef struct minizip_opt_s {
int64_t disk_size;
int32_t encoding;
uint8_t include_path;
int16_t compress_level;
uint8_t compress_method;
uint8_t overwrite;
uint8_t append;
int64_t disk_size;
uint8_t follow_links;
uint8_t store_links;
uint8_t zip_cd;
int32_t encoding;
uint8_t verbose;
uint8_t aes;
} minizip_opt;

View File

@ -45,19 +45,19 @@ static mz_stream_vtbl mz_stream_split_vtbl = {
typedef struct mz_stream_split_s {
mz_stream stream;
int32_t is_open;
int64_t disk_size;
int64_t total_in;
int64_t total_in_disk;
int64_t total_out;
int64_t total_out_disk;
int32_t is_open;
int32_t mode;
char *path_cd;
char *path_disk;
uint32_t path_disk_size;
int32_t number_disk;
int32_t current_disk;
int64_t current_disk_size;
int32_t current_disk;
int32_t reached_end;
} mz_stream_split;