101 if (j >= survivors) {
117 unchanged_offset = 0;
123 unchanged_offset = 0;
140 if (unchanged_offset > 0) {
143 unchanged_offset = 0;
147 if (unchanged_offset == 0) {
162 for (j = 0; j < survivors; j++) {
176 if (
entry->orig !=
NULL &&
entry->orig->offset < unchanged_offset) {
289 zip_int64_t offstart, offdata, offend, data_length;
296 bool needs_recompress, needs_decompress, needs_crc, needs_compress, needs_reencrypt, needs_decrypt, needs_encrypt;
340 max_compressed_size = st.
size;
344 if (algorithm ==
NULL) {
352 if (max_compressed_size > 0xffffffffu) {
404 if (needs_decompress) {
424 if (needs_compress) {
437 const char *password =
NULL;
534 if (is_zip64 != ret) {
559 double total = (double)
len;
676 *survivorsp = survivors;
RZ_API void Ht_() free(HtName_(Ht) *ht)
ZIP_EXTERN int zip_source_close(zip_source_t *_Nonnull)
ZIP_EXTERN void zip_error_set(zip_error_t *_Nullable, int, int)
ZIP_EXTERN void zip_source_rollback_write(zip_source_t *_Nonnull)
ZIP_EXTERN int zip_source_commit_write(zip_source_t *_Nonnull)
ZIP_EXTERN int zip_source_seek_write(zip_source_t *_Nonnull, zip_int64_t, int)
ZIP_EXTERN zip_int64_t zip_source_read(zip_source_t *_Nonnull, void *_Nonnull, zip_uint64_t)
ZIP_EXTERN int zip_error_code_system(const zip_error_t *_Nonnull)
#define ZIP_EM_TRAD_PKWARE
ZIP_EXTERN int zip_source_seek(zip_source_t *_Nonnull, zip_int64_t, int)
#define ZIP_STAT_COMP_METHOD
ZIP_EXTERN int zip_source_get_file_attributes(zip_source_t *_Nonnull, zip_file_attributes_t *_Nonnull)
ZIP_EXTERN void zip_stat_init(zip_stat_t *_Nonnull)
#define ZIP_ER_ENCRNOTSUPP
ZIP_EXTERN zip_error_t *_Nonnull zip_source_error(zip_source_t *_Nonnull)
ZIP_EXTERN int zip_source_stat(zip_source_t *_Nonnull, zip_stat_t *_Nonnull)
#define ZIP_SOURCE_MAKE_COMMAND_BITMASK(cmd)
#define ZIP_STAT_ENCRYPTION_METHOD
#define ZIP_STAT_COMP_SIZE
ZIP_EXTERN void zip_discard(zip_t *_Nonnull)
@ ZIP_SOURCE_BEGIN_WRITE_CLONING
ZIP_EXTERN int zip_source_open(zip_source_t *_Nonnull)
ZIP_EXTERN zip_int64_t zip_source_tell_write(zip_source_t *_Nonnull)
ZIP_EXTERN int zip_source_begin_write(zip_source_t *_Nonnull)
ZIP_EXTERN int zip_error_code_zip(const zip_error_t *_Nonnull)
ZIP_EXTERN void zip_source_free(zip_source_t *_Nullable)
ZIP_EXTERN void zip_source_keep(zip_source_t *_Nonnull)
ZIP_EXTERN int zip_source_begin_write_cloning(zip_source_t *_Nonnull, zip_uint64_t)
void * malloc(size_t size)
static static fork const void static count static fd const char const char static newpath char char char static envp time
static struct sockaddr static addrlen static backlog const void static flags void flags
zip_uint64_t(* maximum_compressed_size)(zip_uint64_t uncompressed_size)
zip_uint16_t encryption_method
zip_uint16_t compression_level
zip_uint16_t encryption_method
zip_progress_t * progress
void error(const char *msg)
if(dbg->bits==RZ_SYS_BITS_64)
zip_uint8_t * _zip_buffer_data(zip_buffer_t *buffer)
zip_buffer_t * _zip_buffer_new(zip_uint8_t *data, zip_uint64_t size)
void _zip_buffer_free(zip_buffer_t *buffer)
bool _zip_buffer_ok(zip_buffer_t *buffer)
int _zip_buffer_put_64(zip_buffer_t *buffer, zip_uint64_t i)
int _zip_buffer_put_32(zip_buffer_t *buffer, zip_uint32_t i)
zip_uint64_t _zip_buffer_offset(zip_buffer_t *buffer)
int _zip_buffer_put(zip_buffer_t *buffer, const void *src, size_t length)
ZIP_EXTERN int zip_close(zip_t *za)
static int copy_source(zip_t *, zip_source_t *, zip_int64_t)
int _zip_changed(const zip_t *za, zip_uint64_t *survivorsp)
static int add_data(zip_t *, zip_source_t *, zip_dirent_t *, zip_uint32_t)
static int write_cdir(zip_t *, const zip_filelist_t *, zip_uint64_t)
static int copy_data(zip_t *, zip_uint64_t)
static int write_data_descriptor(zip_t *za, const zip_dirent_t *dirent, int is_zip64)
zip_int64_t _zip_cdir_write(zip_t *za, const zip_filelist_t *filelist, zip_uint64_t survivors)
zip_dirent_t * _zip_dirent_clone(const zip_dirent_t *sde)
void _zip_dirent_apply_attributes(zip_dirent_t *de, zip_file_attributes_t *attributes, bool force_zip64, zip_uint32_t changed)
int _zip_dirent_write(zip_t *za, zip_dirent_t *de, zip_flags_t flags)
bool _zip_dirent_needs_zip64(const zip_dirent_t *de, zip_flags_t flags)
void _zip_error_set_from_source(zip_error_t *err, zip_source_t *src)
zip_uint64_t _zip_file_get_end(const zip_t *za, zip_uint64_t index, zip_error_t *error)
zip_uint64_t _zip_file_get_offset(const zip_t *za, zip_uint64_t idx, zip_error_t *error)
zip_encryption_implementation _zip_get_encryption_implementation(zip_uint16_t em, int operation)
int _zip_write(zip_t *za, const void *data, zip_uint64_t length)
int _zip_read(zip_source_t *src, zip_uint8_t *b, zip_uint64_t length, zip_error_t *error)
int _zip_progress_subrange(zip_progress_t *progress, double start, double end)
void _zip_progress_end(zip_progress_t *progress)
int _zip_progress_start(zip_progress_t *progress)
int _zip_progress_update(zip_progress_t *progress, double sub_current)
zip_compression_algorithm_t * _zip_get_compression_algorithm(zip_int32_t method, bool compress)
zip_source_t * zip_source_decompress(zip_t *za, zip_source_t *src, zip_int32_t method)
zip_source_t * zip_source_compress(zip_t *za, zip_source_t *src, zip_int32_t method, int compression_flags)
zip_source_t * zip_source_crc_create(zip_source_t *src, int validate, zip_error_t *error)
int zip_source_remove(zip_source_t *src)
zip_int64_t zip_source_supports(zip_source_t *src)
zip_source_t * _zip_source_window_new(zip_source_t *src, zip_uint64_t start, zip_int64_t length, zip_stat_t *st, zip_file_attributes_t *attributes, zip_t *source_archive, zip_uint64_t source_index, zip_error_t *error)
zip_source_t * _zip_source_zip_new(zip_t *srcza, zip_uint64_t srcidx, zip_flags_t flags, zip_uint64_t start, zip_uint64_t len, const char *password, zip_error_t *error)
#define ZIP_DIRENT_PASSWORD
zip_source_t *(* zip_encryption_implementation)(zip_t *, zip_source_t *, zip_uint16_t, int, const char *)
#define ZIP_CM_IS_DEFAULT(x)
#define ZIP_FL_FORCE_ZIP64
#define MAX_DATA_DESCRIPTOR_LENGTH
#define ZIP_ENTRY_DATA_CHANGED(x)
#define ZIP_DIRENT_COMP_METHOD
#define ZIP_ENTRY_HAS_CHANGES(e)
#define byte_array_fini(buf)
#define byte_array_init(buf, size)
#define DEFINE_BYTE_ARRAY(buf, size)
#define ZIP_GPBF_DATA_DESCRIPTOR
#define ZIP_ENTRY_CHANGED(e, f)
#define ZIP_DIRENT_LAST_MOD
#define ZIP_DIRENT_ENCRYPTION_METHOD