NCBI C++ ToolKit
Classes | Macros | Typedefs | Enumerations | Functions | Variables
miniz.c File Reference
#include "miniz.h"
#include <sys/stat.h>
#include <utime.h>
+ Include dependency graph for miniz.c:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Go to the SVN repository for this file.

Classes

struct  tdefl_sym_freq
 
struct  tdefl_output_buffer
 
struct  mz_zip_array
 
struct  mz_zip_internal_state_tag
 
struct  mz_zip_writer_add_state
 

Macros

#define TDEFL_PUT_BITS(b, l)
 
#define TDEFL_RLE_PREV_CODE_SIZE()
 
#define TDEFL_RLE_ZERO_CODE_SIZE()
 
#define TDEFL_PROBE
 
#define TINFL_MEMCPY(d, s, l)   memcpy(d, s, l)
 
#define TINFL_MEMSET(p, c, l)   memset(p, c, l)
 
#define TINFL_CR_BEGIN
 
#define TINFL_CR_RETURN(state_index, result)
 
#define TINFL_CR_RETURN_FOREVER(state_index, result)
 
#define TINFL_CR_FINISH   }
 
#define TINFL_GET_BYTE(state_index, c)
 
#define TINFL_NEED_BITS(state_index, n)
 
#define TINFL_SKIP_BITS(state_index, n)
 
#define TINFL_GET_BITS(state_index, b, n)
 
#define TINFL_HUFF_BITBUF_FILL(state_index, pHuff)
 
#define TINFL_HUFF_DECODE(state_index, sym, pHuff)
 
#define MZ_FOPEN(f, m)   fopen(f, m)
 
#define MZ_FCLOSE   fclose
 
#define MZ_FREAD   fread
 
#define MZ_FWRITE   fwrite
 
#define MZ_FTELL64   ftello
 
#define MZ_FSEEK64   fseeko
 
#define MZ_FILE_STAT_STRUCT   stat
 
#define MZ_FILE_STAT   stat
 
#define MZ_FFLUSH   fflush
 
#define MZ_FREOPEN(f, m, s)   freopen(f, m, s)
 
#define MZ_DELETE_FILE   remove
 
#define MZ_TOLOWER(c)   ((((c) >= 'A') && ((c) <= 'Z')) ? ((c) - 'A' + 'a') : (c))
 
#define MZ_ZIP_ARRAY_SET_ELEMENT_SIZE(array_ptr, element_size)   (array_ptr)->m_element_size = element_size
 
#define MZ_ZIP_ARRAY_ELEMENT(array_ptr, element_type, index)   ((element_type *)((array_ptr)->m_p))[mz_zip_array_range_check(array_ptr, index)]
 
#define MZ_SWAP_UINT32(a, b)
 
#define MZ_WRITE_LE16(p, v)   mz_write_le16((mz_uint8 *)(p), (mz_uint16)(v))
 
#define MZ_WRITE_LE32(p, v)   mz_write_le32((mz_uint8 *)(p), (mz_uint32)(v))
 
#define MZ_WRITE_LE64(p, v)   mz_write_le64((mz_uint8 *)(p), (mz_uint64)(v))
 
#define MZ_ZIP64_MAX_LOCAL_EXTRA_FIELD_SIZE   (sizeof(mz_uint16) * 2 + sizeof(mz_uint64) * 2)
 
#define MZ_ZIP64_MAX_CENTRAL_EXTRA_FIELD_SIZE   (sizeof(mz_uint16) * 2 + sizeof(mz_uint64) * 3)
 

Typedefs

typedef unsigned char mz_validate_uint16[sizeof(mz_uint16)==2 ? 1 :-1]
 
typedef unsigned char mz_validate_uint32[sizeof(mz_uint32)==4 ? 1 :-1]
 
typedef unsigned char mz_validate_uint64[sizeof(mz_uint64)==8 ? 1 :-1]
 

Enumerations

enum  { TDEFL_MAX_SUPPORTED_HUFF_CODESIZE = 32 }
 
enum  {
  MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIG = 0x06054b50 , MZ_ZIP_CENTRAL_DIR_HEADER_SIG = 0x02014b50 , MZ_ZIP_LOCAL_DIR_HEADER_SIG = 0x04034b50 , MZ_ZIP_LOCAL_DIR_HEADER_SIZE = 30 ,
  MZ_ZIP_CENTRAL_DIR_HEADER_SIZE = 46 , MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE = 22 , MZ_ZIP64_END_OF_CENTRAL_DIR_HEADER_SIG = 0x06064b50 , MZ_ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIG = 0x07064b50 ,
  MZ_ZIP64_END_OF_CENTRAL_DIR_HEADER_SIZE = 56 , MZ_ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIZE = 20 , MZ_ZIP64_EXTENDED_INFORM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AG_USES_STRONG_ENCRYPTION = 64 , MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_LOCAL_DIR_IS_MASKED = 8192 , MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_UTF8 = 1 << 11
}
 

Functions

mz_ulong mz_adler32 (mz_ulong adler, const unsigned char *ptr, size_t buf_len)
 
mz_ulong mz_crc32 (mz_ulong crc, const mz_uint8 *ptr, size_t buf_len)
 
void mz_free (void *p)
 
void * miniz_def_alloc_func (void *opaque, size_t items, size_t size)
 
void miniz_def_free_func (void *opaque, void *address)
 
void * miniz_def_realloc_func (void *opaque, void *address, size_t items, size_t size)
 
const char * mz_version (void)
 
static tdefl_sym_freqtdefl_radix_sort_syms (mz_uint num_syms, tdefl_sym_freq *pSyms0, tdefl_sym_freq *pSyms1)
 
static void tdefl_calculate_minimum_redundancy (tdefl_sym_freq *A, int n)
 
static void tdefl_huffman_enforce_max_code_size (int *pNum_codes, int code_list_len, int max_code_size)
 
static void tdefl_optimize_huffman_table (tdefl_compressor *d, int table_num, int table_len, int code_size_limit, int static_table)
 
static void tdefl_start_dynamic_block (tdefl_compressor *d)
 
static void tdefl_start_static_block (tdefl_compressor *d)
 
static mz_bool tdefl_compress_lz_codes (tdefl_compressor *d)
 
static mz_bool tdefl_compress_block (tdefl_compressor *d, mz_bool static_block)
 
static int tdefl_flush_block (tdefl_compressor *d, int flush)
 
static void tdefl_find_match (tdefl_compressor *d, mz_uint lookahead_pos, mz_uint max_dist, mz_uint max_match_len, mz_uint *pMatch_dist, mz_uint *pMatch_len)
 
static void tdefl_record_literal (tdefl_compressor *d, mz_uint8 lit)
 
static void tdefl_record_match (tdefl_compressor *d, mz_uint match_len, mz_uint match_dist)
 
static mz_bool tdefl_compress_normal (tdefl_compressor *d)
 
static tdefl_status tdefl_flush_output_buffer (tdefl_compressor *d)
 
tdefl_status tdefl_compress (tdefl_compressor *d, const void *pIn_buf, size_t *pIn_buf_size, void *pOut_buf, size_t *pOut_buf_size, tdefl_flush flush)
 
tdefl_status tdefl_compress_buffer (tdefl_compressor *d, const void *pIn_buf, size_t in_buf_size, tdefl_flush flush)
 
tdefl_status tdefl_init (tdefl_compressor *d, tdefl_put_buf_func_ptr pPut_buf_func, void *pPut_buf_user, int flags)
 
tdefl_status tdefl_get_prev_return_status (tdefl_compressor *d)
 
mz_uint32 tdefl_get_adler32 (tdefl_compressor *d)
 
mz_bool tdefl_compress_mem_to_output (const void *pBuf, size_t buf_len, tdefl_put_buf_func_ptr pPut_buf_func, void *pPut_buf_user, int flags)
 
static mz_bool tdefl_output_buffer_putter (const void *pBuf, int len, void *pUser)
 
void * tdefl_compress_mem_to_heap (const void *pSrc_buf, size_t src_buf_len, size_t *pOut_len, int flags)
 
size_t tdefl_compress_mem_to_mem (void *pOut_buf, size_t out_buf_len, const void *pSrc_buf, size_t src_buf_len, int flags)
 
mz_uint tdefl_create_comp_flags_from_zip_params (int level, int window_bits, int strategy)
 
void * tdefl_write_image_to_png_file_in_memory_ex (const void *pImage, int w, int h, int num_chans, size_t *pLen_out, mz_uint level, mz_bool flip)
 
void * tdefl_write_image_to_png_file_in_memory (const void *pImage, int w, int h, int num_chans, size_t *pLen_out)
 
tdefl_compressortdefl_compressor_alloc ()
 
void tdefl_compressor_free (tdefl_compressor *pComp)
 
tinfl_status tinfl_decompress (tinfl_decompressor *r, const mz_uint8 *pIn_buf_next, size_t *pIn_buf_size, mz_uint8 *pOut_buf_start, mz_uint8 *pOut_buf_next, size_t *pOut_buf_size, const mz_uint32 decomp_flags)
 
void * tinfl_decompress_mem_to_heap (const void *pSrc_buf, size_t src_buf_len, size_t *pOut_len, int flags)
 
size_t tinfl_decompress_mem_to_mem (void *pOut_buf, size_t out_buf_len, const void *pSrc_buf, size_t src_buf_len, int flags)
 
int tinfl_decompress_mem_to_callback (const void *pIn_buf, size_t *pIn_buf_size, tinfl_put_buf_func_ptr pPut_buf_func, void *pPut_buf_user, int flags)
 
tinfl_decompressortinfl_decompressor_alloc ()
 
void tinfl_decompressor_free (tinfl_decompressor *pDecomp)
 
static mz_uint mz_zip_array_range_check (const mz_zip_array *pArray, mz_uint index)
 
static void mz_zip_array_init (mz_zip_array *pArray, mz_uint32 element_size)
 
static void mz_zip_array_clear (mz_zip_archive *pZip, mz_zip_array *pArray)
 
static mz_bool mz_zip_array_ensure_capacity (mz_zip_archive *pZip, mz_zip_array *pArray, size_t min_new_capacity, mz_uint growing)
 
static mz_bool mz_zip_array_reserve (mz_zip_archive *pZip, mz_zip_array *pArray, size_t new_capacity, mz_uint growing)
 
static mz_bool mz_zip_array_resize (mz_zip_archive *pZip, mz_zip_array *pArray, size_t new_size, mz_uint growing)
 
static mz_bool mz_zip_array_ensure_room (mz_zip_archive *pZip, mz_zip_array *pArray, size_t n)
 
static mz_bool mz_zip_array_push_back (mz_zip_archive *pZip, mz_zip_array *pArray, const void *pElements, size_t n)
 
static time_t mz_zip_dos_to_time_t (int dos_time, int dos_date)
 
static void mz_zip_time_t_to_dos_time (time_t time, mz_uint16 *pDOS_time, mz_uint16 *pDOS_date)
 
static mz_bool mz_zip_get_file_modified_time (const char *pFilename, time_t *pTime)
 
static mz_bool mz_zip_set_file_times (const char *pFilename, time_t access_time, time_t modified_time)
 
static mz_bool mz_zip_set_error (mz_zip_archive *pZip, mz_zip_error err_num)
 
static mz_bool mz_zip_reader_init_internal (mz_zip_archive *pZip, mz_uint flags)
 
static mz_bool mz_zip_reader_filename_less (const mz_zip_array *pCentral_dir_array, const mz_zip_array *pCentral_dir_offsets, mz_uint l_index, mz_uint r_index)
 
static void mz_zip_reader_sort_central_dir_offsets_by_filename (mz_zip_archive *pZip)
 
static mz_bool mz_zip_reader_locate_header_sig (mz_zip_archive *pZip, mz_uint32 record_sig, mz_uint32 record_size, mz_int64 *pOfs)
 
static mz_bool mz_zip_reader_read_central_dir (mz_zip_archive *pZip, mz_uint flags)
 
void mz_zip_zero_struct (mz_zip_archive *pZip)
 
static mz_bool mz_zip_reader_end_internal (mz_zip_archive *pZip, mz_bool set_last_error)
 
mz_bool mz_zip_reader_end (mz_zip_archive *pZip)
 
mz_bool mz_zip_reader_init (mz_zip_archive *pZip, mz_uint64 size, mz_uint flags)
 
static size_t mz_zip_mem_read_func (void *pOpaque, mz_uint64 file_ofs, void *pBuf, size_t n)
 
mz_bool mz_zip_reader_init_mem (mz_zip_archive *pZip, const void *pMem, size_t size, mz_uint flags)
 
static size_t mz_zip_file_read_func (void *pOpaque, mz_uint64 file_ofs, void *pBuf, size_t n)
 
mz_bool mz_zip_reader_init_file (mz_zip_archive *pZip, const char *pFilename, mz_uint32 flags)
 
mz_bool mz_zip_reader_init_file_v2 (mz_zip_archive *pZip, const char *pFilename, mz_uint flags, mz_uint64 file_start_ofs, mz_uint64 archive_size)
 
mz_bool mz_zip_reader_init_cfile (mz_zip_archive *pZip, FILE *pFile, mz_uint64 archive_size, mz_uint flags)
 
static const mz_uint8mz_zip_get_cdh (mz_zip_archive *pZip, mz_uint file_index)
 
mz_bool mz_zip_reader_is_file_encrypted (mz_zip_archive *pZip, mz_uint file_index)
 
mz_bool mz_zip_reader_is_file_supported (mz_zip_archive *pZip, mz_uint file_index)
 
mz_bool mz_zip_reader_is_file_a_directory (mz_zip_archive *pZip, mz_uint file_index)
 
static mz_bool mz_zip_file_stat_internal (mz_zip_archive *pZip, mz_uint file_index, const mz_uint8 *pCentral_dir_header, mz_zip_archive_file_stat *pStat, mz_bool *pFound_zip64_extra_data)
 
static mz_bool mz_zip_string_equal (const char *pA, const char *pB, mz_uint len, mz_uint flags)
 
static int mz_zip_filename_compare (const mz_zip_array *pCentral_dir_array, const mz_zip_array *pCentral_dir_offsets, mz_uint l_index, const char *pR, mz_uint r_len)
 
static mz_bool mz_zip_locate_file_binary_search (mz_zip_archive *pZip, const char *pFilename, mz_uint32 *pIndex)
 
int mz_zip_reader_locate_file (mz_zip_archive *pZip, const char *pName, const char *pComment, mz_uint flags)
 
mz_bool mz_zip_reader_locate_file_v2 (mz_zip_archive *pZip, const char *pName, const char *pComment, mz_uint flags, mz_uint32 *pIndex)
 
mz_bool mz_zip_reader_extract_to_mem_no_alloc (mz_zip_archive *pZip, mz_uint file_index, void *pBuf, size_t buf_size, mz_uint flags, void *pUser_read_buf, size_t user_read_buf_size)
 
mz_bool mz_zip_reader_extract_file_to_mem_no_alloc (mz_zip_archive *pZip, const char *pFilename, void *pBuf, size_t buf_size, mz_uint flags, void *pUser_read_buf, size_t user_read_buf_size)
 
mz_bool mz_zip_reader_extract_to_mem (mz_zip_archive *pZip, mz_uint file_index, void *pBuf, size_t buf_size, mz_uint flags)
 
mz_bool mz_zip_reader_extract_file_to_mem (mz_zip_archive *pZip, const char *pFilename, void *pBuf, size_t buf_size, mz_uint flags)
 
void * mz_zip_reader_extract_to_heap (mz_zip_archive *pZip, mz_uint file_index, size_t *pSize, mz_uint flags)
 
void * mz_zip_reader_extract_file_to_heap (mz_zip_archive *pZip, const char *pFilename, size_t *pSize, mz_uint flags)
 
mz_bool mz_zip_reader_extract_to_callback (mz_zip_archive *pZip, mz_uint file_index, mz_file_write_func pCallback, void *pOpaque, mz_uint flags)
 
mz_bool mz_zip_reader_extract_file_to_callback (mz_zip_archive *pZip, const char *pFilename, mz_file_write_func pCallback, void *pOpaque, mz_uint flags)
 
mz_zip_reader_extract_iter_statemz_zip_reader_extract_iter_new (mz_zip_archive *pZip, mz_uint file_index, mz_uint flags)
 
mz_zip_reader_extract_iter_statemz_zip_reader_extract_file_iter_new (mz_zip_archive *pZip, const char *pFilename, mz_uint flags)
 
size_t mz_zip_reader_extract_iter_read (mz_zip_reader_extract_iter_state *pState, void *pvBuf, size_t buf_size)
 
mz_bool mz_zip_reader_extract_iter_free (mz_zip_reader_extract_iter_state *pState)
 
static size_t mz_zip_file_write_callback (void *pOpaque, mz_uint64 ofs, const void *pBuf, size_t n)
 
mz_bool mz_zip_reader_extract_to_file (mz_zip_archive *pZip, mz_uint file_index, const char *pDst_filename, mz_uint flags)
 
mz_bool mz_zip_reader_extract_file_to_file (mz_zip_archive *pZip, const char *pArchive_filename, const char *pDst_filename, mz_uint flags)
 
mz_bool mz_zip_reader_extract_to_cfile (mz_zip_archive *pZip, mz_uint file_index, FILE *pFile, mz_uint flags)
 
mz_bool mz_zip_reader_extract_file_to_cfile (mz_zip_archive *pZip, const char *pArchive_filename, FILE *pFile, mz_uint flags)
 
static size_t mz_zip_compute_crc32_callback (void *pOpaque, mz_uint64 file_ofs, const void *pBuf, size_t n)
 
mz_bool mz_zip_validate_file (mz_zip_archive *pZip, mz_uint file_index, mz_uint flags)
 
mz_bool mz_zip_validate_archive (mz_zip_archive *pZip, mz_uint flags)
 
mz_bool mz_zip_validate_mem_archive (const void *pMem, size_t size, mz_uint flags, mz_zip_error *pErr)
 
mz_bool mz_zip_validate_file_archive (const char *pFilename, mz_uint flags, mz_zip_error *pErr)
 
static void mz_write_le16 (mz_uint8 *p, mz_uint16 v)
 
static void mz_write_le32 (mz_uint8 *p, mz_uint32 v)
 
static void mz_write_le64 (mz_uint8 *p, mz_uint64 v)
 
static size_t mz_zip_heap_write_func (void *pOpaque, mz_uint64 file_ofs, const void *pBuf, size_t n)
 
static mz_bool mz_zip_writer_end_internal (mz_zip_archive *pZip, mz_bool set_last_error)
 
mz_bool mz_zip_writer_init_v2 (mz_zip_archive *pZip, mz_uint64 existing_size, mz_uint flags)
 
mz_bool mz_zip_writer_init (mz_zip_archive *pZip, mz_uint64 existing_size)
 
mz_bool mz_zip_writer_init_heap_v2 (mz_zip_archive *pZip, size_t size_to_reserve_at_beginning, size_t initial_allocation_size, mz_uint flags)
 
mz_bool mz_zip_writer_init_heap (mz_zip_archive *pZip, size_t size_to_reserve_at_beginning, size_t initial_allocation_size)
 
static size_t mz_zip_file_write_func (void *pOpaque, mz_uint64 file_ofs, const void *pBuf, size_t n)
 
mz_bool mz_zip_writer_init_file (mz_zip_archive *pZip, const char *pFilename, mz_uint64 size_to_reserve_at_beginning)
 
mz_bool mz_zip_writer_init_file_v2 (mz_zip_archive *pZip, const char *pFilename, mz_uint64 size_to_reserve_at_beginning, mz_uint flags)
 
mz_bool mz_zip_writer_init_cfile (mz_zip_archive *pZip, FILE *pFile, mz_uint flags)
 
mz_bool mz_zip_writer_init_from_reader_v2 (mz_zip_archive *pZip, const char *pFilename, mz_uint flags)
 
mz_bool mz_zip_writer_init_from_reader (mz_zip_archive *pZip, const char *pFilename)
 
mz_bool mz_zip_writer_add_mem (mz_zip_archive *pZip, const char *pArchive_name, const void *pBuf, size_t buf_size, mz_uint level_and_flags)
 
static mz_bool mz_zip_writer_add_put_buf_callback (const void *pBuf, int len, void *pUser)
 
static mz_uint32 mz_zip_writer_create_zip64_extra_data (mz_uint8 *pBuf, mz_uint64 *pUncomp_size, mz_uint64 *pComp_size, mz_uint64 *pLocal_header_ofs)
 
static mz_bool mz_zip_writer_create_local_dir_header (mz_zip_archive *pZip, mz_uint8 *pDst, mz_uint16 filename_size, mz_uint16 extra_size, mz_uint64 uncomp_size, mz_uint64 comp_size, mz_uint32 uncomp_crc32, mz_uint16 method, mz_uint16 bit_flags, mz_uint16 dos_time, mz_uint16 dos_date)
 
static mz_bool mz_zip_writer_create_central_dir_header (mz_zip_archive *pZip, mz_uint8 *pDst, mz_uint16 filename_size, mz_uint16 extra_size, mz_uint16 comment_size, mz_uint64 uncomp_size, mz_uint64 comp_size, mz_uint32 uncomp_crc32, mz_uint16 method, mz_uint16 bit_flags, mz_uint16 dos_time, mz_uint16 dos_date, mz_uint64 local_header_ofs, mz_uint32 ext_attributes)
 
static mz_bool mz_zip_writer_add_to_central_dir (mz_zip_archive *pZip, const char *pFilename, mz_uint16 filename_size, const void *pExtra, mz_uint16 extra_size, const void *pComment, mz_uint16 comment_size, mz_uint64 uncomp_size, mz_uint64 comp_size, mz_uint32 uncomp_crc32, mz_uint16 method, mz_uint16 bit_flags, mz_uint16 dos_time, mz_uint16 dos_date, mz_uint64 local_header_ofs, mz_uint32 ext_attributes, const char *user_extra_data, mz_uint user_extra_data_len)
 
static mz_bool mz_zip_writer_validate_archive_name (const char *pArchive_name)
 
static mz_uint mz_zip_writer_compute_padding_needed_for_file_alignment (mz_zip_archive *pZip)
 
static mz_bool mz_zip_writer_write_zeros (mz_zip_archive *pZip, mz_uint64 cur_file_ofs, mz_uint32 n)
 
mz_bool mz_zip_writer_add_mem_ex (mz_zip_archive *pZip, const char *pArchive_name, const void *pBuf, size_t buf_size, const void *pComment, mz_uint16 comment_size, mz_uint level_and_flags, mz_uint64 uncomp_size, mz_uint32 uncomp_crc32)
 
mz_bool mz_zip_writer_add_mem_ex_v2 (mz_zip_archive *pZip, const char *pArchive_name, const void *pBuf, size_t buf_size, const void *pComment, mz_uint16 comment_size, mz_uint level_and_flags, mz_uint64 uncomp_size, mz_uint32 uncomp_crc32, time_t *last_modified, const char *user_extra_data, mz_uint user_extra_data_len, const char *user_extra_data_central, mz_uint user_extra_data_central_len)
 
mz_bool mz_zip_writer_add_read_buf_callback (mz_zip_archive *pZip, const char *pArchive_name, mz_file_read_func read_callback, void *callback_opaque, mz_uint64 max_size, const time_t *pFile_time, const void *pComment, mz_uint16 comment_size, mz_uint level_and_flags, const char *user_extra_data, mz_uint user_extra_data_len, const char *user_extra_data_central, mz_uint user_extra_data_central_len)
 
static size_t mz_file_read_func_stdio (void *pOpaque, mz_uint64 file_ofs, void *pBuf, size_t n)
 
mz_bool mz_zip_writer_add_cfile (mz_zip_archive *pZip, const char *pArchive_name, FILE *pSrc_file, mz_uint64 max_size, const time_t *pFile_time, const void *pComment, mz_uint16 comment_size, mz_uint level_and_flags, const char *user_extra_data, mz_uint user_extra_data_len, const char *user_extra_data_central, mz_uint user_extra_data_central_len)
 
mz_bool mz_zip_writer_add_file (mz_zip_archive *pZip, const char *pArchive_name, const char *pSrc_filename, const void *pComment, mz_uint16 comment_size, mz_uint level_and_flags)
 
static mz_bool mz_zip_writer_update_zip64_extension_block (mz_zip_array *pNew_ext, mz_zip_archive *pZip, const mz_uint8 *pExt, uint32_t ext_len, mz_uint64 *pComp_size, mz_uint64 *pUncomp_size, mz_uint64 *pLocal_header_ofs, mz_uint32 *pDisk_start)
 
mz_bool mz_zip_writer_add_from_zip_reader (mz_zip_archive *pZip, mz_zip_archive *pSource_zip, mz_uint src_file_index)
 
mz_bool mz_zip_writer_finalize_archive (mz_zip_archive *pZip)
 
mz_bool mz_zip_writer_finalize_heap_archive (mz_zip_archive *pZip, void **ppBuf, size_t *pSize)
 
mz_bool mz_zip_writer_end (mz_zip_archive *pZip)
 
mz_bool mz_zip_add_mem_to_archive_file_in_place (const char *pZip_filename, const char *pArchive_name, const void *pBuf, size_t buf_size, const void *pComment, mz_uint16 comment_size, mz_uint level_and_flags)
 
mz_bool mz_zip_add_mem_to_archive_file_in_place_v2 (const char *pZip_filename, const char *pArchive_name, const void *pBuf, size_t buf_size, const void *pComment, mz_uint16 comment_size, mz_uint level_and_flags, mz_zip_error *pErr)
 
void * mz_zip_extract_archive_file_to_heap_v2 (const char *pZip_filename, const char *pArchive_name, const char *pComment, size_t *pSize, mz_uint flags, mz_zip_error *pErr)
 
void * mz_zip_extract_archive_file_to_heap (const char *pZip_filename, const char *pArchive_name, size_t *pSize, mz_uint flags)
 
mz_zip_mode mz_zip_get_mode (mz_zip_archive *pZip)
 
mz_zip_type mz_zip_get_type (mz_zip_archive *pZip)
 
mz_zip_error mz_zip_set_last_error (mz_zip_archive *pZip, mz_zip_error err_num)
 
mz_zip_error mz_zip_peek_last_error (mz_zip_archive *pZip)
 
mz_zip_error mz_zip_clear_last_error (mz_zip_archive *pZip)
 
mz_zip_error mz_zip_get_last_error (mz_zip_archive *pZip)
 
const char * mz_zip_get_error_string (mz_zip_error mz_err)
 
mz_bool mz_zip_is_zip64 (mz_zip_archive *pZip)
 
size_t mz_zip_get_central_dir_size (mz_zip_archive *pZip)
 
mz_uint mz_zip_reader_get_num_files (mz_zip_archive *pZip)
 
mz_uint64 mz_zip_get_archive_size (mz_zip_archive *pZip)
 
mz_uint64 mz_zip_get_archive_file_start_offset (mz_zip_archive *pZip)
 
FILE * mz_zip_get_cfile (mz_zip_archive *pZip)
 
size_t mz_zip_read_archive_data (mz_zip_archive *pZip, mz_uint64 file_ofs, void *pBuf, size_t n)
 
mz_uint mz_zip_reader_get_filename (mz_zip_archive *pZip, mz_uint file_index, char *pFilename, mz_uint filename_buf_size)
 
mz_bool mz_zip_reader_file_stat (mz_zip_archive *pZip, mz_uint file_index, mz_zip_archive_file_stat *pStat)
 
mz_bool mz_zip_end (mz_zip_archive *pZip)
 

Variables

static const mz_uint16 s_tdefl_len_sym [256]
 
static const mz_uint8 s_tdefl_len_extra [256]
 
static const mz_uint8 s_tdefl_small_dist_sym [512]
 
static const mz_uint8 s_tdefl_small_dist_extra [512]
 
static const mz_uint8 s_tdefl_large_dist_sym [128]
 
static const mz_uint8 s_tdefl_large_dist_extra [128]
 
static mz_uint8 s_tdefl_packed_code_size_syms_swizzle [] = { 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 }
 
static const mz_uint mz_bitmasks [17] = { 0x0000, 0x0001, 0x0003, 0x0007, 0x000F, 0x001F, 0x003F, 0x007F, 0x00FF, 0x01FF, 0x03FF, 0x07FF, 0x0FFF, 0x1FFF, 0x3FFF, 0x7FFF, 0xFFFF }
 
static const mz_uint s_tdefl_num_probes [11] = { 0, 1, 6, 32, 16, 32, 128, 256, 512, 768, 1500 }
 

Macro Definition Documentation

◆ MZ_DELETE_FILE

#define MZ_DELETE_FILE   remove

Definition at line 3117 of file miniz.c.

◆ MZ_FCLOSE

#define MZ_FCLOSE   fclose

Definition at line 3103 of file miniz.c.

◆ MZ_FFLUSH

#define MZ_FFLUSH   fflush

Definition at line 3115 of file miniz.c.

◆ MZ_FILE_STAT

#define MZ_FILE_STAT   stat

Definition at line 3114 of file miniz.c.

◆ MZ_FILE_STAT_STRUCT

#define MZ_FILE_STAT_STRUCT   stat

Definition at line 3113 of file miniz.c.

◆ MZ_FOPEN

#define MZ_FOPEN (   f,
 
)    fopen(f, m)

Definition at line 3102 of file miniz.c.

◆ MZ_FREAD

#define MZ_FREAD   fread

Definition at line 3104 of file miniz.c.

◆ MZ_FREOPEN

#define MZ_FREOPEN (   f,
  m,
 
)    freopen(f, m, s)

Definition at line 3116 of file miniz.c.

◆ MZ_FSEEK64

#define MZ_FSEEK64   fseeko

Definition at line 3111 of file miniz.c.

◆ MZ_FTELL64

#define MZ_FTELL64   ftello

Definition at line 3110 of file miniz.c.

◆ MZ_FWRITE

#define MZ_FWRITE   fwrite

Definition at line 3105 of file miniz.c.

◆ MZ_SWAP_UINT32

#define MZ_SWAP_UINT32 (   a,
  b 
)
Value:
do \
{ \
mz_uint32 t = a; \
a = b; \
b = t; \
} \
MZ_MACRO_END
unsigned int a
Definition: ncbi_localip.c:102
EIPRangeType t
Definition: ncbi_localip.c:101

Definition at line 3451 of file miniz.c.

◆ MZ_TOLOWER

#define MZ_TOLOWER (   c)    ((((c) >= 'A') && ((c) <= 'Z')) ? ((c) - 'A' + 'a') : (c))

Definition at line 3121 of file miniz.c.

◆ MZ_WRITE_LE16

#define MZ_WRITE_LE16 (   p,
 
)    mz_write_le16((mz_uint8 *)(p), (mz_uint16)(v))

Definition at line 5574 of file miniz.c.

◆ MZ_WRITE_LE32

#define MZ_WRITE_LE32 (   p,
 
)    mz_write_le32((mz_uint8 *)(p), (mz_uint32)(v))

Definition at line 5575 of file miniz.c.

◆ MZ_WRITE_LE64

#define MZ_WRITE_LE64 (   p,
 
)    mz_write_le64((mz_uint8 *)(p), (mz_uint64)(v))

Definition at line 5576 of file miniz.c.

◆ MZ_ZIP64_MAX_CENTRAL_EXTRA_FIELD_SIZE

#define MZ_ZIP64_MAX_CENTRAL_EXTRA_FIELD_SIZE   (sizeof(mz_uint16) * 2 + sizeof(mz_uint64) * 3)

Definition at line 5959 of file miniz.c.

◆ MZ_ZIP64_MAX_LOCAL_EXTRA_FIELD_SIZE

#define MZ_ZIP64_MAX_LOCAL_EXTRA_FIELD_SIZE   (sizeof(mz_uint16) * 2 + sizeof(mz_uint64) * 2)

Definition at line 5958 of file miniz.c.

◆ MZ_ZIP_ARRAY_ELEMENT

#define MZ_ZIP_ARRAY_ELEMENT (   array_ptr,
  element_type,
  index 
)    ((element_type *)((array_ptr)->m_p))[mz_zip_array_range_check(array_ptr, index)]

Definition at line 3252 of file miniz.c.

◆ MZ_ZIP_ARRAY_SET_ELEMENT_SIZE

#define MZ_ZIP_ARRAY_SET_ELEMENT_SIZE (   array_ptr,
  element_size 
)    (array_ptr)->m_element_size = element_size

Definition at line 3244 of file miniz.c.

◆ TDEFL_PROBE

#define TDEFL_PROBE
Value:
next_probe_pos = d->m_next[probe_pos]; \
if ((!next_probe_pos) || ((dist = (mz_uint16)(lookahead_pos - next_probe_pos)) > max_dist)) \
return; \
probe_pos = next_probe_pos & TDEFL_LZ_DICT_SIZE_MASK; \
if ((d->m_dict[probe_pos + match_len] == c0) && (d->m_dict[probe_pos + match_len - 1] == c1)) \
break;
unsigned short mz_uint16
Definition: miniz.h:495
@ TDEFL_LZ_DICT_SIZE_MASK
Definition: miniz.h:659

◆ TDEFL_PUT_BITS

#define TDEFL_PUT_BITS (   b,
 
)
Value:
do \
{ \
mz_uint bits = b; \
mz_uint len = l; \
MZ_ASSERT(bits <= ((1U << len) - 1U)); \
d->m_bit_buffer |= (bits << d->m_bits_in); \
d->m_bits_in += len; \
while (d->m_bits_in >= 8) \
{ \
if (d->m_pOutput_buf < d->m_pOutput_buf_end) \
*d->m_pOutput_buf++ = (mz_uint8)(d->m_bit_buffer); \
d->m_bit_buffer >>= 8; \
d->m_bits_in -= 8; \
} \
} \
MZ_MACRO_END
int len
unsigned char mz_uint8
Definition: miniz.h:493

Definition at line 914 of file miniz.c.

◆ TDEFL_RLE_PREV_CODE_SIZE

#define TDEFL_RLE_PREV_CODE_SIZE ( )
Value:
{ \
if (rle_repeat_count) \
{ \
if (rle_repeat_count < 3) \
{ \
d->m_huff_count[2][prev_code_size] = (mz_uint16)(d->m_huff_count[2][prev_code_size] + rle_repeat_count); \
while (rle_repeat_count--) \
packed_code_sizes[num_packed_code_sizes++] = prev_code_size; \
} \
else \
{ \
d->m_huff_count[2][16] = (mz_uint16)(d->m_huff_count[2][16] + 1); \
packed_code_sizes[num_packed_code_sizes++] = 16; \
packed_code_sizes[num_packed_code_sizes++] = (mz_uint8)(rle_repeat_count - 3); \
} \
rle_repeat_count = 0; \
} \
}

Definition at line 932 of file miniz.c.

◆ TDEFL_RLE_ZERO_CODE_SIZE

#define TDEFL_RLE_ZERO_CODE_SIZE ( )
Value:
{ \
if (rle_z_count) \
{ \
if (rle_z_count < 3) \
{ \
d->m_huff_count[2][0] = (mz_uint16)(d->m_huff_count[2][0] + rle_z_count); \
while (rle_z_count--) \
packed_code_sizes[num_packed_code_sizes++] = 0; \
} \
else if (rle_z_count <= 10) \
{ \
d->m_huff_count[2][17] = (mz_uint16)(d->m_huff_count[2][17] + 1); \
packed_code_sizes[num_packed_code_sizes++] = 17; \
packed_code_sizes[num_packed_code_sizes++] = (mz_uint8)(rle_z_count - 3); \
} \
else \
{ \
d->m_huff_count[2][18] = (mz_uint16)(d->m_huff_count[2][18] + 1); \
packed_code_sizes[num_packed_code_sizes++] = 18; \
packed_code_sizes[num_packed_code_sizes++] = (mz_uint8)(rle_z_count - 11); \
} \
rle_z_count = 0; \
} \
}

Definition at line 952 of file miniz.c.

◆ TINFL_CR_BEGIN

#define TINFL_CR_BEGIN
Value:
switch (r->m_state) \
{ \
case 0:
double r(size_t dimension_, const Int4 *score_, const double *prob_, double theta_)

Definition at line 2255 of file miniz.c.

◆ TINFL_CR_FINISH

#define TINFL_CR_FINISH   }

Definition at line 2277 of file miniz.c.

◆ TINFL_CR_RETURN

#define TINFL_CR_RETURN (   state_index,
  result 
)
Value:
do \
{ \
status = result; \
r->m_state = state_index; \
goto common_exit; \
case state_index:; \
} \
MZ_MACRO_END
else result
Definition: token2.c:20

Definition at line 2259 of file miniz.c.

◆ TINFL_CR_RETURN_FOREVER

#define TINFL_CR_RETURN_FOREVER (   state_index,
  result 
)
Value:
do \
{ \
for (;;) \
{ \
TINFL_CR_RETURN(state_index, result); \
} \
} \
MZ_MACRO_END

Definition at line 2268 of file miniz.c.

◆ TINFL_GET_BITS

#define TINFL_GET_BITS (   state_index,
  b,
  n 
)
Value:
do \
{ \
if (num_bits < (mz_uint)(n)) \
{ \
TINFL_NEED_BITS(state_index, n); \
} \
b = bit_buf & ((1 << (n)) - 1); \
bit_buf >>= (n); \
num_bits -= (n); \
} \
MZ_MACRO_END
yy_size_t n
unsigned int mz_uint
Definition: miniz.h:497

Definition at line 2309 of file miniz.c.

◆ TINFL_GET_BYTE

#define TINFL_GET_BYTE (   state_index,
 
)
Value:
do \
{ \
while (pIn_buf_cur >= pIn_buf_end) \
{ \
} \
c = *pIn_buf_cur++; \
} \
MZ_MACRO_END
@ TINFL_STATUS_NEEDS_MORE_INPUT
Definition: miniz.h:846
@ TINFL_STATUS_FAILED_CANNOT_MAKE_PROGRESS
Definition: miniz.h:826
@ TINFL_FLAG_HAS_MORE_INPUT
Definition: miniz.h:782

Definition at line 2279 of file miniz.c.

◆ TINFL_HUFF_BITBUF_FILL

#define TINFL_HUFF_BITBUF_FILL (   state_index,
  pHuff 
)
Value:
do \
{ \
temp = (pHuff)->m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]; \
if (temp >= 0) \
{ \
code_len = temp >> 9; \
if ((code_len) && (num_bits >= code_len)) \
break; \
} \
else if (num_bits > TINFL_FAST_LOOKUP_BITS) \
{ \
code_len = TINFL_FAST_LOOKUP_BITS; \
do \
{ \
temp = (pHuff)->m_tree[~temp + ((bit_buf >> code_len++) & 1)]; \
} while ((temp < 0) && (num_bits >= (code_len + 1))); \
if (temp >= 0) \
break; \
} \
TINFL_GET_BYTE(state_index, c); \
bit_buf |= (((tinfl_bit_buf_t)c) << num_bits); \
num_bits += 8; \
} while (num_bits < 15);
@ TINFL_FAST_LOOKUP_SIZE
Definition: miniz.h:876
@ TINFL_FAST_LOOKUP_BITS
Definition: miniz.h:875
mz_uint32 tinfl_bit_buf_t
Definition: miniz.h:895

Definition at line 2326 of file miniz.c.

◆ TINFL_HUFF_DECODE

#define TINFL_HUFF_DECODE (   state_index,
  sym,
  pHuff 
)

Definition at line 2357 of file miniz.c.

◆ TINFL_MEMCPY

#define TINFL_MEMCPY (   d,
  s,
 
)    memcpy(d, s, l)

Definition at line 2252 of file miniz.c.

◆ TINFL_MEMSET

#define TINFL_MEMSET (   p,
  c,
 
)    memset(p, c, l)

Definition at line 2253 of file miniz.c.

◆ TINFL_NEED_BITS

#define TINFL_NEED_BITS (   state_index,
  n 
)
Value:
do \
{ \
mz_uint c; \
TINFL_GET_BYTE(state_index, c); \
bit_buf |= (((tinfl_bit_buf_t)c) << num_bits); \
num_bits += 8; \
} while (num_bits < (mz_uint)(n))

Definition at line 2290 of file miniz.c.

◆ TINFL_SKIP_BITS

#define TINFL_SKIP_BITS (   state_index,
  n 
)
Value:
do \
{ \
if (num_bits < (mz_uint)(n)) \
{ \
TINFL_NEED_BITS(state_index, n); \
} \
bit_buf >>= (n); \
num_bits -= (n); \
} \
MZ_MACRO_END

Definition at line 2298 of file miniz.c.

Typedef Documentation

◆ mz_validate_uint16

typedef unsigned char mz_validate_uint16[sizeof(mz_uint16)==2 ? 1 :-1]

Definition at line 30 of file miniz.c.

◆ mz_validate_uint32

typedef unsigned char mz_validate_uint32[sizeof(mz_uint32)==4 ? 1 :-1]

Definition at line 31 of file miniz.c.

◆ mz_validate_uint64

typedef unsigned char mz_validate_uint64[sizeof(mz_uint64)==8 ? 1 :-1]

Definition at line 32 of file miniz.c.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
TDEFL_MAX_SUPPORTED_HUFF_CODESIZE 

Definition at line 833 of file miniz.c.

◆ anonymous enum

anonymous enum
Enumerator
MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIG 
MZ_ZIP_CENTRAL_DIR_HEADER_SIG 
MZ_ZIP_LOCAL_DIR_HEADER_SIG 
MZ_ZIP_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P_GENERAL_PURPOSE_BIT_FLAG_USES_STRONG_ENCRYPTION 
MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_LOCAL_DIR_IS_MASKED 
MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_UTF8 

Definition at line 3124 of file miniz.c.

Function Documentation

◆ miniz_def_alloc_func()

void* miniz_def_alloc_func ( void *  opaque,
size_t  items,
size_t  size 
)

◆ miniz_def_free_func()

void miniz_def_free_func ( void *  opaque,
void *  address 
)

Definition at line 172 of file miniz.c.

References MZ_FREE.

Referenced by mz_zip_reader_init_internal(), and mz_zip_writer_init_v2().

◆ miniz_def_realloc_func()

void* miniz_def_realloc_func ( void *  opaque,
void *  address,
size_t  items,
size_t  size 
)

◆ mz_adler32()

mz_ulong mz_adler32 ( mz_ulong  adler,
const unsigned char *  ptr,
size_t  buf_len 
)

Definition at line 40 of file miniz.c.

References i, and MZ_ADLER32_INIT.

Referenced by tdefl_compress().

◆ mz_crc32()

mz_ulong mz_crc32 ( mz_ulong  crc,
const mz_uint8 ptr,
size_t  buf_len 
)

◆ mz_file_read_func_stdio()

static size_t mz_file_read_func_stdio ( void *  pOpaque,
mz_uint64  file_ofs,
void *  pBuf,
size_t  n 
)
static

Definition at line 6766 of file miniz.c.

References MZ_FILE, MZ_FREAD, MZ_FSEEK64, MZ_FTELL64, n, and SEEK_SET.

Referenced by mz_zip_writer_add_cfile().

◆ mz_free()

void mz_free ( void *  p)

Definition at line 162 of file miniz.c.

References MZ_FREE.

◆ mz_version()

const char* mz_version ( void  )

Definition at line 183 of file miniz.c.

References MZ_VERSION.

◆ mz_write_le16()

static void mz_write_le16 ( mz_uint8 p,
mz_uint16  v 
)
inlinestatic

Definition at line 5556 of file miniz.c.

Referenced by mz_zip_writer_update_zip64_extension_block().

◆ mz_write_le32()

static void mz_write_le32 ( mz_uint8 p,
mz_uint32  v 
)
inlinestatic

Definition at line 5561 of file miniz.c.

Referenced by mz_write_le64(), and mz_zip_writer_update_zip64_extension_block().

◆ mz_write_le64()

static void mz_write_le64 ( mz_uint8 p,
mz_uint64  v 
)
inlinestatic

Definition at line 5568 of file miniz.c.

References mz_write_le32().

Referenced by mz_zip_writer_update_zip64_extension_block().

◆ mz_zip_add_mem_to_archive_file_in_place()

mz_bool mz_zip_add_mem_to_archive_file_in_place ( const char *  pZip_filename,
const char *  pArchive_name,
const void *  pBuf,
size_t  buf_size,
const void *  pComment,
mz_uint16  comment_size,
mz_uint  level_and_flags 
)

Definition at line 7377 of file miniz.c.

References mz_zip_add_mem_to_archive_file_in_place_v2(), and NULL.

◆ mz_zip_add_mem_to_archive_file_in_place_v2()

mz_bool mz_zip_add_mem_to_archive_file_in_place_v2 ( const char *  pZip_filename,
const char *  pArchive_name,
const void *  pBuf,
size_t  buf_size,
const void *  pComment,
mz_uint16  comment_size,
mz_uint  level_and_flags,
mz_zip_error pErr 
)

◆ mz_zip_array_clear()

static void mz_zip_array_clear ( mz_zip_archive pZip,
mz_zip_array pArray 
)
inlinestatic

◆ mz_zip_array_ensure_capacity()

static mz_bool mz_zip_array_ensure_capacity ( mz_zip_archive pZip,
mz_zip_array pArray,
size_t  min_new_capacity,
mz_uint  growing 
)
static

◆ mz_zip_array_ensure_room()

static mz_bool mz_zip_array_ensure_room ( mz_zip_archive pZip,
mz_zip_array pArray,
size_t  n 
)
inlinestatic

Definition at line 3310 of file miniz.c.

References mz_zip_array::m_size, MZ_TRUE, mz_zip_array_reserve(), and n.

Referenced by mz_zip_writer_add_mem_ex_v2().

◆ mz_zip_array_init()

static void mz_zip_array_init ( mz_zip_array pArray,
mz_uint32  element_size 
)
inlinestatic

Definition at line 3257 of file miniz.c.

References mz_zip_array::m_element_size.

Referenced by mz_zip_validate_file(), and mz_zip_writer_add_from_zip_reader().

◆ mz_zip_array_push_back()

static mz_bool mz_zip_array_push_back ( mz_zip_archive pZip,
mz_zip_array pArray,
const void *  pElements,
size_t  n 
)
inlinestatic

◆ mz_zip_array_range_check()

static mz_uint mz_zip_array_range_check ( const mz_zip_array pArray,
mz_uint  index 
)
inlinestatic

Definition at line 3247 of file miniz.c.

References MZ_ASSERT.

◆ mz_zip_array_reserve()

static mz_bool mz_zip_array_reserve ( mz_zip_archive pZip,
mz_zip_array pArray,
size_t  new_capacity,
mz_uint  growing 
)
inlinestatic

◆ mz_zip_array_resize()

static mz_bool mz_zip_array_resize ( mz_zip_archive pZip,
mz_zip_array pArray,
size_t  new_size,
mz_uint  growing 
)
inlinestatic

◆ mz_zip_clear_last_error()

mz_zip_error mz_zip_clear_last_error ( mz_zip_archive pZip)

Definition at line 7556 of file miniz.c.

References MZ_ZIP_NO_ERROR, and mz_zip_set_last_error().

◆ mz_zip_compute_crc32_callback()

static size_t mz_zip_compute_crc32_callback ( void *  pOpaque,
mz_uint64  file_ofs,
const void *  pBuf,
size_t  n 
)
static

Definition at line 5192 of file miniz.c.

References mz_crc32(), and n.

Referenced by mz_zip_validate_file().

◆ mz_zip_dos_to_time_t()

static time_t mz_zip_dos_to_time_t ( int  dos_time,
int  dos_date 
)
static

Definition at line 3326 of file miniz.c.

Referenced by mz_zip_file_stat_internal().

◆ mz_zip_end()

mz_bool mz_zip_end ( mz_zip_archive pZip)

◆ mz_zip_extract_archive_file_to_heap()

void* mz_zip_extract_archive_file_to_heap ( const char *  pZip_filename,
const char *  pArchive_name,
size_t *  pSize,
mz_uint  flags 
)

Definition at line 7514 of file miniz.c.

References flags, mz_zip_extract_archive_file_to_heap_v2(), and NULL.

◆ mz_zip_extract_archive_file_to_heap_v2()

void* mz_zip_extract_archive_file_to_heap_v2 ( const char *  pZip_filename,
const char *  pArchive_name,
const char *  pComment,
size_t *  pSize,
mz_uint  flags,
mz_zip_error pErr 
)

◆ mz_zip_file_read_func()

static size_t mz_zip_file_read_func ( void *  pOpaque,
mz_uint64  file_ofs,
void *  pBuf,
size_t  n 
)
static

◆ mz_zip_file_stat_internal()

static mz_bool mz_zip_file_stat_internal ( mz_zip_archive pZip,
mz_uint  file_index,
const mz_uint8 pCentral_dir_header,
mz_zip_archive_file_stat pStat,
mz_bool pFound_zip64_extra_data 
)
static

Definition at line 4134 of file miniz.c.

References mz_zip_archive_file_stat::m_bit_flag, mz_zip_internal_state_tag::m_central_dir_offsets, mz_zip_archive_file_stat::m_central_dir_ofs, mz_zip_archive_file_stat::m_comment, mz_zip_archive_file_stat::m_comment_size, mz_zip_archive_file_stat::m_comp_size, mz_zip_archive_file_stat::m_crc32, mz_zip_archive_file_stat::m_external_attr, mz_zip_archive_file_stat::m_file_index, mz_zip_archive_file_stat::m_filename, mz_zip_archive_file_stat::m_internal_attr, mz_zip_archive_file_stat::m_is_directory, mz_zip_archive_file_stat::m_is_encrypted, mz_zip_archive_file_stat::m_is_supported, mz_zip_archive_file_stat::m_local_header_ofs, mz_zip_archive_file_stat::m_method, mz_zip_archive::m_pState, mz_zip_archive_file_stat::m_time, mz_zip_archive_file_stat::m_uncomp_size, mz_zip_archive_file_stat::m_version_made_by, mz_zip_archive_file_stat::m_version_needed, MZ_FALSE, MZ_MAX, MZ_MIN, MZ_READ_LE16, MZ_READ_LE32, MZ_READ_LE64, MZ_TRUE, MZ_UINT32_MAX, MZ_ZIP64_EXTENDED_INFORMATION_FIELD_HEADER_ID, MZ_ZIP_ARRAY_ELEMENT, MZ_ZIP_CDH_BIT_FLAG_OFS, MZ_ZIP_CDH_COMMENT_LEN_OFS, MZ_ZIP_CDH_COMPRESSED_SIZE_OFS, MZ_ZIP_CDH_CRC32_OFS, MZ_ZIP_CDH_DECOMPRESSED_SIZE_OFS, MZ_ZIP_CDH_EXTERNAL_ATTR_OFS, MZ_ZIP_CDH_EXTRA_LEN_OFS, MZ_ZIP_CDH_FILE_DATE_OFS, MZ_ZIP_CDH_FILE_TIME_OFS, MZ_ZIP_CDH_FILENAME_LEN_OFS, MZ_ZIP_CDH_INTERNAL_ATTR_OFS, MZ_ZIP_CDH_LOCAL_HEADER_OFS, MZ_ZIP_CDH_METHOD_OFS, MZ_ZIP_CDH_VERSION_MADE_BY_OFS, MZ_ZIP_CDH_VERSION_NEEDED_OFS, MZ_ZIP_CENTRAL_DIR_HEADER_SIZE, mz_zip_dos_to_time_t(), MZ_ZIP_INVALID_HEADER_OR_CORRUPTED, MZ_ZIP_INVALID_PARAMETER, MZ_ZIP_MAX_ARCHIVE_FILE_COMMENT_SIZE, MZ_ZIP_MAX_ARCHIVE_FILENAME_SIZE, mz_zip_reader_is_file_a_directory(), mz_zip_reader_is_file_encrypted(), mz_zip_reader_is_file_supported(), mz_zip_set_error(), and n.

Referenced by mz_zip_reader_file_stat(), mz_zip_validate_file(), and mz_zip_writer_add_from_zip_reader().

◆ mz_zip_file_write_callback()

static size_t mz_zip_file_write_callback ( void *  pOpaque,
mz_uint64  ofs,
const void *  pBuf,
size_t  n 
)
static

◆ mz_zip_file_write_func()

static size_t mz_zip_file_write_func ( void *  pOpaque,
mz_uint64  file_ofs,
const void *  pBuf,
size_t  n 
)
static

◆ mz_zip_filename_compare()

static int mz_zip_filename_compare ( const mz_zip_array pCentral_dir_array,
const mz_zip_array pCentral_dir_offsets,
mz_uint  l_index,
const char *  pR,
mz_uint  r_len 
)
inlinestatic

◆ mz_zip_get_archive_file_start_offset()

mz_uint64 mz_zip_get_archive_file_start_offset ( mz_zip_archive pZip)

◆ mz_zip_get_archive_size()

mz_uint64 mz_zip_get_archive_size ( mz_zip_archive pZip)

Definition at line 7671 of file miniz.c.

References mz_zip_archive::m_archive_size.

◆ mz_zip_get_cdh()

static const mz_uint8* mz_zip_get_cdh ( mz_zip_archive pZip,
mz_uint  file_index 
)
inlinestatic

◆ mz_zip_get_central_dir_size()

size_t mz_zip_get_central_dir_size ( mz_zip_archive pZip)

◆ mz_zip_get_cfile()

FILE* mz_zip_get_cfile ( mz_zip_archive pZip)

Definition at line 7685 of file miniz.c.

References mz_zip_internal_state_tag::m_pFile, and mz_zip_archive::m_pState.

◆ mz_zip_get_error_string()

const char* mz_zip_get_error_string ( mz_zip_error  mz_err)

◆ mz_zip_get_file_modified_time()

static mz_bool mz_zip_get_file_modified_time ( const char *  pFilename,
time_t *  pTime 
)
static

Definition at line 3364 of file miniz.c.

References MZ_FALSE, MZ_FILE_STAT, MZ_FILE_STAT_STRUCT, and MZ_TRUE.

Referenced by mz_zip_writer_add_file().

◆ mz_zip_get_last_error()

mz_zip_error mz_zip_get_last_error ( mz_zip_archive pZip)

Definition at line 7561 of file miniz.c.

References mz_zip_archive::m_last_error, MZ_ZIP_INVALID_PARAMETER, and MZ_ZIP_NO_ERROR.

◆ mz_zip_get_mode()

mz_zip_mode mz_zip_get_mode ( mz_zip_archive pZip)

Definition at line 7525 of file miniz.c.

References mz_zip_archive::m_zip_mode, and MZ_ZIP_MODE_INVALID.

◆ mz_zip_get_type()

mz_zip_type mz_zip_get_type ( mz_zip_archive pZip)

Definition at line 7530 of file miniz.c.

References mz_zip_archive::m_zip_type, and MZ_ZIP_TYPE_INVALID.

◆ mz_zip_heap_write_func()

static size_t mz_zip_heap_write_func ( void *  pOpaque,
mz_uint64  file_ofs,
const void *  pBuf,
size_t  n 
)
static

◆ mz_zip_is_zip64()

mz_bool mz_zip_is_zip64 ( mz_zip_archive pZip)

Definition at line 7650 of file miniz.c.

References mz_zip_archive::m_pState, mz_zip_internal_state_tag::m_zip64, and MZ_FALSE.

◆ mz_zip_locate_file_binary_search()

static mz_bool mz_zip_locate_file_binary_search ( mz_zip_archive pZip,
const char *  pFilename,
mz_uint32 pIndex 
)
static

◆ mz_zip_mem_read_func()

static size_t mz_zip_mem_read_func ( void *  pOpaque,
mz_uint64  file_ofs,
void *  pBuf,
size_t  n 
)
static

◆ mz_zip_peek_last_error()

mz_zip_error mz_zip_peek_last_error ( mz_zip_archive pZip)

Definition at line 7548 of file miniz.c.

References mz_zip_archive::m_last_error, and MZ_ZIP_INVALID_PARAMETER.

◆ mz_zip_read_archive_data()

size_t mz_zip_read_archive_data ( mz_zip_archive pZip,
mz_uint64  file_ofs,
void *  pBuf,
size_t  n 
)

◆ mz_zip_reader_end()

mz_bool mz_zip_reader_end ( mz_zip_archive pZip)

Definition at line 3864 of file miniz.c.

References MZ_TRUE, and mz_zip_reader_end_internal().

Referenced by CArchiveZip::Close(), and mz_zip_end().

◆ mz_zip_reader_end_internal()

static mz_bool mz_zip_reader_end_internal ( mz_zip_archive pZip,
mz_bool  set_last_error 
)
static

◆ mz_zip_reader_extract_file_iter_new()

mz_zip_reader_extract_iter_state* mz_zip_reader_extract_file_iter_new ( mz_zip_archive pZip,
const char *  pFilename,
mz_uint  flags 
)

◆ mz_zip_reader_extract_file_to_callback()

mz_bool mz_zip_reader_extract_file_to_callback ( mz_zip_archive pZip,
const char *  pFilename,
mz_file_write_func  pCallback,
void *  pOpaque,
mz_uint  flags 
)

◆ mz_zip_reader_extract_file_to_cfile()

mz_bool mz_zip_reader_extract_file_to_cfile ( mz_zip_archive pZip,
const char *  pArchive_filename,
FILE *  pFile,
mz_uint  flags 
)

◆ mz_zip_reader_extract_file_to_file()

mz_bool mz_zip_reader_extract_file_to_file ( mz_zip_archive pZip,
const char *  pArchive_filename,
const char *  pDst_filename,
mz_uint  flags 
)

◆ mz_zip_reader_extract_file_to_heap()

void* mz_zip_reader_extract_file_to_heap ( mz_zip_archive pZip,
const char *  pFilename,
size_t *  pSize,
mz_uint  flags 
)

◆ mz_zip_reader_extract_file_to_mem()

mz_bool mz_zip_reader_extract_file_to_mem ( mz_zip_archive pZip,
const char *  pFilename,
void *  pBuf,
size_t  buf_size,
mz_uint  flags 
)

Definition at line 4552 of file miniz.c.

References flags, mz_zip_reader_extract_file_to_mem_no_alloc(), and NULL.

◆ mz_zip_reader_extract_file_to_mem_no_alloc()

mz_bool mz_zip_reader_extract_file_to_mem_no_alloc ( mz_zip_archive pZip,
const char *  pFilename,
void *  pBuf,
size_t  buf_size,
mz_uint  flags,
void *  pUser_read_buf,
size_t  user_read_buf_size 
)

◆ mz_zip_reader_extract_iter_free()

mz_bool mz_zip_reader_extract_iter_free ( mz_zip_reader_extract_iter_state pState)

◆ mz_zip_reader_extract_iter_new()

mz_zip_reader_extract_iter_state* mz_zip_reader_extract_iter_new ( mz_zip_archive pZip,
mz_uint  file_index,
mz_uint  flags 
)

Definition at line 4820 of file miniz.c.

References mz_zip_reader_extract_iter_state::comp_remaining, mz_zip_reader_extract_iter_state::cur_file_ofs, mz_zip_reader_extract_iter_state::file_crc32, mz_zip_reader_extract_iter_state::file_stat, flags, mz_zip_reader_extract_iter_state::flags, mz_zip_reader_extract_iter_state::inflator, mz_zip_archive::m_archive_size, mz_zip_archive_file_stat::m_bit_flag, mz_zip_archive_file_stat::m_comp_size, mz_zip_archive_file_stat::m_local_header_ofs, mz_zip_archive_file_stat::m_method, mz_zip_archive::m_pAlloc, mz_zip_archive::m_pAlloc_opaque, mz_zip_archive::m_pFree, mz_zip_archive::m_pIO_opaque, mz_zip_internal_state_tag::m_pMem, mz_zip_archive::m_pRead, mz_zip_archive::m_pState, MZ_CRC32_INIT, MZ_DEFLATED, MZ_MIN, MZ_READ_LE16, MZ_READ_LE32, MZ_ZIP_ALLOC_FAILED, MZ_ZIP_FILE_READ_FAILED, MZ_ZIP_FLAG_COMPRESSED_DATA, MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_COMPRESSED_PATCH_FLAG, MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_IS_ENCRYPTED, MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_USES_STRONG_ENCRYPTION, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED, MZ_ZIP_LDH_EXTRA_LEN_OFS, MZ_ZIP_LDH_FILENAME_LEN_OFS, MZ_ZIP_LOCAL_DIR_HEADER_SIG, MZ_ZIP_LOCAL_DIR_HEADER_SIZE, MZ_ZIP_MAX_IO_BUF_SIZE, mz_zip_reader_file_stat(), mz_zip_set_error(), MZ_ZIP_UNSUPPORTED_ENCRYPTION, MZ_ZIP_UNSUPPORTED_METHOD, NULL, mz_zip_reader_extract_iter_state::out_blk_remain, mz_zip_reader_extract_iter_state::out_buf_ofs, mz_zip_reader_extract_iter_state::pRead_buf, mz_zip_reader_extract_iter_state::pWrite_buf, mz_zip_reader_extract_iter_state::pZip, mz_zip_reader_extract_iter_state::read_buf_avail, mz_zip_reader_extract_iter_state::read_buf_ofs, mz_zip_reader_extract_iter_state::read_buf_size, mz_zip_reader_extract_iter_state::status, tinfl_init, TINFL_LZ_DICT_SIZE, and TINFL_STATUS_DONE.

Referenced by mz_zip_reader_extract_file_iter_new().

◆ mz_zip_reader_extract_iter_read()

size_t mz_zip_reader_extract_iter_read ( mz_zip_reader_extract_iter_state pState,
void *  pvBuf,
size_t  buf_size 
)

◆ mz_zip_reader_extract_to_callback()

mz_bool mz_zip_reader_extract_to_callback ( mz_zip_archive pZip,
mz_uint  file_index,
mz_file_write_func  pCallback,
void *  pOpaque,
mz_uint  flags 
)

Definition at line 4611 of file miniz.c.

References flags, mz_zip_archive::m_archive_size, mz_zip_archive_file_stat::m_bit_flag, mz_zip_archive_file_stat::m_comp_size, mz_zip_archive_file_stat::m_crc32, mz_zip_archive_file_stat::m_is_directory, mz_zip_archive_file_stat::m_local_header_ofs, mz_zip_archive_file_stat::m_method, mz_zip_archive::m_pAlloc, mz_zip_archive::m_pAlloc_opaque, mz_zip_archive::m_pFree, mz_zip_archive::m_pIO_opaque, mz_zip_internal_state_tag::m_pMem, mz_zip_archive::m_pRead, mz_zip_archive::m_pState, mz_zip_archive_file_stat::m_uncomp_size, mz_crc32(), MZ_CRC32_INIT, MZ_DEFLATED, MZ_FALSE, MZ_MIN, MZ_READ_LE16, MZ_READ_LE32, MZ_TRUE, MZ_UINT32_MAX, MZ_ZIP_ALLOC_FAILED, MZ_ZIP_DECOMPRESSION_FAILED, MZ_ZIP_FILE_READ_FAILED, MZ_ZIP_FLAG_COMPRESSED_DATA, MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_COMPRESSED_PATCH_FLAG, MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_IS_ENCRYPTED, MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_USES_STRONG_ENCRYPTION, MZ_ZIP_INTERNAL_ERROR, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED, MZ_ZIP_INVALID_PARAMETER, MZ_ZIP_LDH_EXTRA_LEN_OFS, MZ_ZIP_LDH_FILENAME_LEN_OFS, MZ_ZIP_LOCAL_DIR_HEADER_SIG, MZ_ZIP_LOCAL_DIR_HEADER_SIZE, MZ_ZIP_MAX_IO_BUF_SIZE, mz_zip_reader_file_stat(), mz_zip_set_error(), MZ_ZIP_UNEXPECTED_DECOMPRESSED_SIZE, MZ_ZIP_UNSUPPORTED_ENCRYPTION, MZ_ZIP_UNSUPPORTED_METHOD, MZ_ZIP_WRITE_CALLBACK_FAILED, NULL, tinfl_decompress(), TINFL_FLAG_HAS_MORE_INPUT, tinfl_init, TINFL_LZ_DICT_SIZE, TINFL_STATUS_DONE, TINFL_STATUS_FAILED, TINFL_STATUS_HAS_MORE_OUTPUT, and TINFL_STATUS_NEEDS_MORE_INPUT.

Referenced by CArchiveZip::ExtractEntryToCallback(), CArchiveZip::ExtractEntryToFileSystem(), mz_zip_reader_extract_file_to_callback(), mz_zip_reader_extract_to_cfile(), mz_zip_reader_extract_to_file(), mz_zip_validate_file(), and CArchiveZip::TestEntry().

◆ mz_zip_reader_extract_to_cfile()

mz_bool mz_zip_reader_extract_to_cfile ( mz_zip_archive pZip,
mz_uint  file_index,
FILE *  pFile,
mz_uint  flags 
)

◆ mz_zip_reader_extract_to_file()

mz_bool mz_zip_reader_extract_to_file ( mz_zip_archive pZip,
mz_uint  file_index,
const char *  pDst_filename,
mz_uint  flags 
)

◆ mz_zip_reader_extract_to_heap()

void* mz_zip_reader_extract_to_heap ( mz_zip_archive pZip,
mz_uint  file_index,
size_t *  pSize,
mz_uint  flags 
)

◆ mz_zip_reader_extract_to_mem()

mz_bool mz_zip_reader_extract_to_mem ( mz_zip_archive pZip,
mz_uint  file_index,
void *  pBuf,
size_t  buf_size,
mz_uint  flags 
)

◆ mz_zip_reader_extract_to_mem_no_alloc()

mz_bool mz_zip_reader_extract_to_mem_no_alloc ( mz_zip_archive pZip,
mz_uint  file_index,
void *  pBuf,
size_t  buf_size,
mz_uint  flags,
void *  pUser_read_buf,
size_t  user_read_buf_size 
)

Definition at line 4396 of file miniz.c.

References flags, if(), mz_zip_archive::m_archive_size, mz_zip_archive_file_stat::m_bit_flag, mz_zip_archive_file_stat::m_comp_size, mz_zip_archive_file_stat::m_crc32, mz_zip_archive_file_stat::m_is_directory, mz_zip_archive_file_stat::m_local_header_ofs, mz_zip_archive_file_stat::m_method, mz_zip_archive::m_pAlloc, mz_zip_archive::m_pAlloc_opaque, mz_zip_archive::m_pFree, mz_zip_archive::m_pIO_opaque, mz_zip_internal_state_tag::m_pMem, mz_zip_archive::m_pRead, mz_zip_archive::m_pState, mz_zip_archive_file_stat::m_uncomp_size, mz_crc32(), MZ_CRC32_INIT, MZ_DEFLATED, MZ_FALSE, MZ_MIN, MZ_READ_LE16, MZ_READ_LE32, MZ_TRUE, MZ_ZIP_ALLOC_FAILED, MZ_ZIP_BUF_TOO_SMALL, MZ_ZIP_CRC_CHECK_FAILED, MZ_ZIP_DECOMPRESSION_FAILED, MZ_ZIP_FILE_READ_FAILED, MZ_ZIP_FLAG_COMPRESSED_DATA, MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_COMPRESSED_PATCH_FLAG, MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_IS_ENCRYPTED, MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_USES_STRONG_ENCRYPTION, MZ_ZIP_INTERNAL_ERROR, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED, MZ_ZIP_INVALID_PARAMETER, MZ_ZIP_LDH_EXTRA_LEN_OFS, MZ_ZIP_LDH_FILENAME_LEN_OFS, MZ_ZIP_LOCAL_DIR_HEADER_SIG, MZ_ZIP_LOCAL_DIR_HEADER_SIZE, MZ_ZIP_MAX_IO_BUF_SIZE, mz_zip_reader_file_stat(), mz_zip_set_error(), MZ_ZIP_UNEXPECTED_DECOMPRESSED_SIZE, MZ_ZIP_UNSUPPORTED_ENCRYPTION, MZ_ZIP_UNSUPPORTED_METHOD, NULL, tinfl_decompress(), TINFL_FLAG_HAS_MORE_INPUT, TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF, tinfl_init, TINFL_STATUS_DONE, TINFL_STATUS_FAILED, and TINFL_STATUS_NEEDS_MORE_INPUT.

Referenced by mz_zip_reader_extract_file_to_mem_no_alloc(), and mz_zip_reader_extract_to_mem().

◆ mz_zip_reader_file_stat()

mz_bool mz_zip_reader_file_stat ( mz_zip_archive pZip,
mz_uint  file_index,
mz_zip_archive_file_stat pStat 
)

◆ mz_zip_reader_filename_less()

static mz_bool mz_zip_reader_filename_less ( const mz_zip_array pCentral_dir_array,
const mz_zip_array pCentral_dir_offsets,
mz_uint  l_index,
mz_uint  r_index 
)
inlinestatic

◆ mz_zip_reader_get_filename()

mz_uint mz_zip_reader_get_filename ( mz_zip_archive pZip,
mz_uint  file_index,
char *  pFilename,
mz_uint  filename_buf_size 
)

◆ mz_zip_reader_get_num_files()

mz_uint mz_zip_reader_get_num_files ( mz_zip_archive pZip)

Definition at line 7666 of file miniz.c.

References mz_zip_archive::m_total_files.

Referenced by CArchiveZip::GetNumEntries().

◆ mz_zip_reader_init()

mz_bool mz_zip_reader_init ( mz_zip_archive pZip,
mz_uint64  size,
mz_uint  flags 
)

◆ mz_zip_reader_init_cfile()

mz_bool mz_zip_reader_init_cfile ( mz_zip_archive pZip,
FILE *  pFile,
mz_uint64  archive_size,
mz_uint  flags 
)

◆ mz_zip_reader_init_file()

mz_bool mz_zip_reader_init_file ( mz_zip_archive pZip,
const char *  pFilename,
mz_uint32  flags 
)

Definition at line 3944 of file miniz.c.

References flags, and mz_zip_reader_init_file_v2().

Referenced by CArchiveZip::OpenFile().

◆ mz_zip_reader_init_file_v2()

mz_bool mz_zip_reader_init_file_v2 ( mz_zip_archive pZip,
const char *  pFilename,
mz_uint  flags,
mz_uint64  file_start_ofs,
mz_uint64  archive_size 
)

◆ mz_zip_reader_init_internal()

static mz_bool mz_zip_reader_init_internal ( mz_zip_archive pZip,
mz_uint  flags 
)
static

◆ mz_zip_reader_init_mem()

mz_bool mz_zip_reader_init_mem ( mz_zip_archive pZip,
const void *  pMem,
size_t  size,
mz_uint  flags 
)

◆ mz_zip_reader_is_file_a_directory()

mz_bool mz_zip_reader_is_file_a_directory ( mz_zip_archive pZip,
mz_uint  file_index 
)

◆ mz_zip_reader_is_file_encrypted()

mz_bool mz_zip_reader_is_file_encrypted ( mz_zip_archive pZip,
mz_uint  file_index 
)

◆ mz_zip_reader_is_file_supported()

mz_bool mz_zip_reader_is_file_supported ( mz_zip_archive pZip,
mz_uint  file_index 
)

◆ mz_zip_reader_locate_file()

int mz_zip_reader_locate_file ( mz_zip_archive pZip,
const char *  pName,
const char *  pComment,
mz_uint  flags 
)

Definition at line 4322 of file miniz.c.

References flags, and mz_zip_reader_locate_file_v2().

◆ mz_zip_reader_locate_file_v2()

mz_bool mz_zip_reader_locate_file_v2 ( mz_zip_archive pZip,
const char *  pName,
const char *  pComment,
mz_uint  flags,
mz_uint32 pIndex 
)

◆ mz_zip_reader_locate_header_sig()

static mz_bool mz_zip_reader_locate_header_sig ( mz_zip_archive pZip,
mz_uint32  record_sig,
mz_uint32  record_size,
mz_int64 pOfs 
)
static

◆ mz_zip_reader_read_central_dir()

static mz_bool mz_zip_reader_read_central_dir ( mz_zip_archive pZip,
mz_uint  flags 
)
static

Definition at line 3559 of file miniz.c.

References buf, flags, for(), i, mz_zip_archive::m_archive_size, mz_zip_internal_state_tag::m_central_dir, mz_zip_internal_state_tag::m_central_dir_offsets, mz_zip_archive::m_central_directory_file_ofs, mz_zip_array::m_p, mz_zip_archive::m_pIO_opaque, mz_zip_archive::m_pRead, mz_zip_archive::m_pState, mz_zip_internal_state_tag::m_sorted_central_dir_offsets, mz_zip_archive::m_total_files, mz_zip_internal_state_tag::m_zip64, mz_zip_internal_state_tag::m_zip64_has_extended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M_ENTRIES_ON_DISK_OFS, MZ_ZIP_ECDH_CDIR_OFS_OFS, MZ_ZIP_ECDH_CDIR_SIZE_OFS, MZ_ZIP_ECDH_CDIR_TOTAL_ENTRIES_OFS, MZ_ZIP_ECDH_NUM_DISK_CDIR_OFS, MZ_ZIP_ECDH_NUM_THIS_DISK_OFS, MZ_ZIP_ECDH_SIG_OFS, MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIG, MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE, MZ_ZIP_FAILED_FINDING_CENTRAL_DIR, MZ_ZIP_FILE_READ_FAILED, MZ_ZIP_FLAG_DO_NOT_SORT_CENTRAL_DIRECTORY, MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_LOCAL_DIR_IS_MASKED, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED, MZ_ZIP_LOCAL_DIR_HEADER_SIZE, MZ_ZIP_NOT_AN_ARCHIVE, mz_zip_reader_locate_header_sig(), mz_zip_reader_sort_central_dir_offsets_by_filename(), mz_zip_set_error(), MZ_ZIP_TOO_MANY_FILES, MZ_ZIP_UNSUPPORTED_CDIR_SIZE, MZ_ZIP_UNSUPPORTED_ENCRYPTION, MZ_ZIP_UNSUPPORTED_MULTIDISK, n, and NULL.

Referenced by mz_zip_reader_init(), mz_zip_reader_init_cfile(), mz_zip_reader_init_file_v2(), and mz_zip_reader_init_mem().

◆ mz_zip_reader_sort_central_dir_offsets_by_filename()

static void mz_zip_reader_sort_central_dir_offsets_by_filename ( mz_zip_archive pZip)
static

◆ mz_zip_set_error()

static mz_bool mz_zip_set_error ( mz_zip_archive pZip,
mz_zip_error  err_num 
)
inlinestatic

◆ mz_zip_set_file_times()

static mz_bool mz_zip_set_file_times ( const char *  pFilename,
time_t  access_time,
time_t  modified_time 
)
static

Definition at line 3378 of file miniz.c.

References t.

Referenced by mz_zip_reader_extract_to_file().

◆ mz_zip_set_last_error()

mz_zip_error mz_zip_set_last_error ( mz_zip_archive pZip,
mz_zip_error  err_num 
)

Definition at line 7535 of file miniz.c.

References mz_zip_archive::m_last_error, and MZ_ZIP_INVALID_PARAMETER.

Referenced by mz_zip_clear_last_error().

◆ mz_zip_string_equal()

static mz_bool mz_zip_string_equal ( const char *  pA,
const char *  pB,
mz_uint  len,
mz_uint  flags 
)
inlinestatic

Definition at line 4254 of file miniz.c.

References flags, i, len, MZ_FALSE, MZ_TOLOWER, MZ_TRUE, and MZ_ZIP_FLAG_CASE_SENSITIVE.

Referenced by mz_zip_reader_locate_file_v2().

◆ mz_zip_time_t_to_dos_time()

static void mz_zip_time_t_to_dos_time ( time_t  time,
mz_uint16 pDOS_time,
mz_uint16 pDOS_date 
)
static

Definition at line 3341 of file miniz.c.

Referenced by mz_zip_writer_add_mem_ex_v2(), and mz_zip_writer_add_read_buf_callback().

◆ mz_zip_validate_archive()

mz_bool mz_zip_validate_archive ( mz_zip_archive pZip,
mz_uint  flags 
)

◆ mz_zip_validate_file()

mz_bool mz_zip_validate_file ( mz_zip_archive pZip,
mz_uint  file_index,
mz_uint  flags 
)

Definition at line 5200 of file miniz.c.

References flags, if(), mz_zip_archive::m_archive_size, mz_zip_archive_file_stat::m_comp_size, mz_zip_archive_file_stat::m_crc32, mz_zip_archive_file_stat::m_filename, mz_zip_archive_file_stat::m_is_directory, mz_zip_archive_file_stat::m_is_encrypted, mz_zip_archive_file_stat::m_is_supported, mz_zip_archive_file_stat::m_local_header_ofs, mz_zip_archive_file_stat::m_method, mz_zip_array::m_p, mz_zip_archive::m_pAlloc, mz_zip_archive::m_pFree, mz_zip_archive::m_pIO_opaque, mz_zip_archive::m_pRead, mz_zip_archive::m_pState, mz_zip_archive::m_total_files, mz_zip_archive_file_stat::m_uncomp_size, mz_zip_internal_state_tag::m_zip64, MZ_CRC32_INIT, MZ_DEFLATED, MZ_FALSE, MZ_MAX, MZ_READ_LE16, MZ_READ_LE32, MZ_READ_LE64, MZ_TRUE, MZ_UINT32_MAX, MZ_ZIP64_EXTENDED_INFORMATION_FIELD_HEADER_ID, MZ_ZIP_ALLOC_FAILED, mz_zip_array_clear(), mz_zip_array_init(), mz_zip_array_resize(), mz_zip_compute_crc32_callback(), MZ_ZIP_DATA_DESCRIPTOR_ID, MZ_ZIP_FILE_READ_FAILED, mz_zip_file_stat_internal(), MZ_ZIP_FLAG_VALIDATE_HEADERS_ONLY, mz_zip_get_cdh(), MZ_ZIP_INVALID_HEADER_OR_CORRUPTED, MZ_ZIP_INVALID_PARAMETER, MZ_ZIP_LDH_BIT_FLAG_OFS, MZ_ZIP_LDH_COMPRESSED_SIZE_OFS, MZ_ZIP_LDH_CRC32_OFS, MZ_ZIP_LDH_DECOMPRESSED_SIZE_OFS, MZ_ZIP_LDH_EXTRA_LEN_OFS, MZ_ZIP_LDH_FILENAME_LEN_OFS, MZ_ZIP_LOCAL_DIR_HEADER_SIG, MZ_ZIP_LOCAL_DIR_HEADER_SIZE, mz_zip_reader_extract_to_callback(), mz_zip_set_error(), MZ_ZIP_UNSUPPORTED_ENCRYPTION, MZ_ZIP_UNSUPPORTED_FEATURE, MZ_ZIP_UNSUPPORTED_METHOD, and MZ_ZIP_VALIDATION_FAILED.

Referenced by mz_zip_validate_archive().

◆ mz_zip_validate_file_archive()

mz_bool mz_zip_validate_file_archive ( const char *  pFilename,
mz_uint  flags,
mz_zip_error pErr 
)

◆ mz_zip_validate_mem_archive()

mz_bool mz_zip_validate_mem_archive ( const void *  pMem,
size_t  size,
mz_uint  flags,
mz_zip_error pErr 
)

◆ mz_zip_writer_add_cfile()

mz_bool mz_zip_writer_add_cfile ( mz_zip_archive pZip,
const char *  pArchive_name,
FILE *  pSrc_file,
mz_uint64  max_size,
const time_t *  pFile_time,
const void *  pComment,
mz_uint16  comment_size,
mz_uint  level_and_flags,
const char *  user_extra_data,
mz_uint  user_extra_data_len,
const char *  user_extra_data_central,
mz_uint  user_extra_data_central_len 
)

Definition at line 6777 of file miniz.c.

References mz_file_read_func_stdio(), and mz_zip_writer_add_read_buf_callback().

Referenced by mz_zip_writer_add_file().

◆ mz_zip_writer_add_file()

mz_bool mz_zip_writer_add_file ( mz_zip_archive pZip,
const char *  pArchive_name,
const char *  pSrc_filename,
const void *  pComment,
mz_uint16  comment_size,
mz_uint  level_and_flags 
)

◆ mz_zip_writer_add_from_zip_reader()

mz_bool mz_zip_writer_add_from_zip_reader ( mz_zip_archive pZip,
mz_zip_archive pSource_zip,
mz_uint  src_file_index 
)

◆ mz_zip_writer_add_mem()

mz_bool mz_zip_writer_add_mem ( mz_zip_archive pZip,
const char *  pArchive_name,
const void *  pBuf,
size_t  buf_size,
mz_uint  level_and_flags 
)

Definition at line 5935 of file miniz.c.

References mz_zip_writer_add_mem_ex(), and NULL.

◆ mz_zip_writer_add_mem_ex()

mz_bool mz_zip_writer_add_mem_ex ( mz_zip_archive pZip,
const char *  pArchive_name,
const void *  pBuf,
size_t  buf_size,
const void *  pComment,
mz_uint16  comment_size,
mz_uint  level_and_flags,
mz_uint64  uncomp_size,
mz_uint32  uncomp_crc32 
)

◆ mz_zip_writer_add_mem_ex_v2()

mz_bool mz_zip_writer_add_mem_ex_v2 ( mz_zip_archive pZip,
const char *  pArchive_name,
const void *  pBuf,
size_t  buf_size,
const void *  pComment,
mz_uint16  comment_size,
mz_uint  level_and_flags,
mz_uint64  uncomp_size,
mz_uint32  uncomp_crc32,
time_t *  last_modified,
const char *  user_extra_data,
mz_uint  user_extra_data_len,
const char *  user_extra_data_central,
mz_uint  user_extra_data_central_len 
)

Definition at line 6120 of file miniz.c.

References mz_zip_archive::m_archive_size, mz_zip_internal_state_tag::m_central_dir, mz_zip_internal_state_tag::m_central_dir_offsets, mz_zip_archive::m_file_offset_alignment, mz_zip_archive::m_pAlloc, mz_zip_archive::m_pAlloc_opaque, mz_zip_archive::m_pFree, mz_zip_archive::m_pIO_opaque, mz_zip_archive::m_pState, mz_zip_archive::m_pWrite, mz_zip_array::m_size, mz_zip_archive::m_total_files, mz_zip_internal_state_tag::m_zip64, mz_zip_archive::m_zip_mode, MZ_ASSERT, MZ_CLEAR_OBJ, mz_crc32(), MZ_CRC32_INIT, MZ_DEFAULT_LEVEL, MZ_DEFAULT_STRATEGY, MZ_DEFLATED, MZ_FALSE, MZ_TIME_T, MZ_TRUE, MZ_UBER_COMPRESSION, MZ_UINT16_MAX, MZ_UINT32_MAX, MZ_WRITE_LE32, MZ_WRITE_LE64, MZ_ZIP64_MAX_CENTRAL_EXTRA_FIELD_SIZE, MZ_ZIP_ALLOC_FAILED, MZ_ZIP_ARCHIVE_TOO_LARGE, mz_zip_array_ensure_room(), MZ_ZIP_CENTRAL_DIR_HEADER_SIZE, MZ_ZIP_COMPRESSION_FAILED, MZ_ZIP_DATA_DESCRIPTER_SIZE32, MZ_ZIP_DATA_DESCRIPTER_SIZE64, MZ_ZIP_DATA_DESCRIPTOR_ID, MZ_ZIP_DOS_DIR_ATTRIBUTE_BITFLAG, MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE, MZ_ZIP_FILE_WRITE_FAILED, MZ_ZIP_FLAG_ASCII_FILENAME, MZ_ZIP_FLAG_COMPRESSED_DATA, MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_UTF8, MZ_ZIP_INTERNAL_ERROR, MZ_ZIP_INVALID_FILENAME, MZ_ZIP_INVALID_PARAMETER, MZ_ZIP_LDH_BIT_FLAG_HAS_LOCATOR, MZ_ZIP_LOCAL_DIR_HEADER_SIZE, MZ_ZIP_MODE_WRITING, mz_zip_set_error(), mz_zip_time_t_to_dos_time(), MZ_ZIP_TOO_MANY_FILES, MZ_ZIP_UNSUPPORTED_CDIR_SIZE, mz_zip_writer_add_put_buf_callback(), mz_zip_writer_add_to_central_dir(), mz_zip_writer_compute_padding_needed_for_file_alignment(), mz_zip_writer_create_local_dir_header(), mz_zip_writer_create_zip64_extra_data(), mz_zip_writer_validate_archive_name(), mz_zip_writer_write_zeros(), NULL, tdefl_compress_buffer(), tdefl_create_comp_flags_from_zip_params(), TDEFL_FINISH, tdefl_init(), TDEFL_STATUS_DONE, and TDEFL_STATUS_OKAY.

Referenced by mz_zip_writer_add_mem_ex().

◆ mz_zip_writer_add_put_buf_callback()

static mz_bool mz_zip_writer_add_put_buf_callback ( const void *  pBuf,
int  len,
void *  pUser 
)
static

◆ mz_zip_writer_add_read_buf_callback()

mz_bool mz_zip_writer_add_read_buf_callback ( mz_zip_archive pZip,
const char *  pArchive_name,
mz_file_read_func  read_callback,
void *  callback_opaque,
mz_uint64  max_size,
const time_t *  pFile_time,
const void *  pComment,
mz_uint16  comment_size,
mz_uint  level_and_flags,
const char *  user_extra_data,
mz_uint  user_extra_data_len,
const char *  user_extra_data_central,
mz_uint  user_extra_data_central_len 
)

Definition at line 6406 of file miniz.c.

References mz_zip_archive::m_archive_size, mz_zip_internal_state_tag::m_central_dir, mz_zip_archive::m_file_offset_alignment, mz_zip_archive::m_pAlloc, mz_zip_archive::m_pAlloc_opaque, mz_zip_archive::m_pFree, mz_zip_archive::m_pIO_opaque, mz_zip_archive::m_pNeeds_keepalive, mz_zip_archive::m_pState, mz_zip_archive::m_pWrite, mz_zip_array::m_size, mz_zip_archive::m_total_files, mz_zip_internal_state_tag::m_zip64, mz_zip_archive::m_zip_mode, MZ_ASSERT, MZ_CLEAR_OBJ, mz_crc32(), MZ_CRC32_INIT, MZ_DEFAULT_LEVEL, MZ_DEFAULT_STRATEGY, MZ_DEFLATED, MZ_FALSE, MZ_TRUE, MZ_UBER_COMPRESSION, MZ_UINT16_MAX, MZ_UINT32_MAX, MZ_WRITE_LE32, MZ_WRITE_LE64, MZ_ZIP64_MAX_CENTRAL_EXTRA_FIELD_SIZE, MZ_ZIP_ALLOC_FAILED, MZ_ZIP_ARCHIVE_TOO_LARGE, MZ_ZIP_CENTRAL_DIR_HEADER_SIZE, MZ_ZIP_COMPRESSION_FAILED, MZ_ZIP_DATA_DESCRIPTER_SIZE32, MZ_ZIP_DATA_DESCRIPTER_SIZE64, MZ_ZIP_DATA_DESCRIPTOR_ID, MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE, MZ_ZIP_FILE_READ_FAILED, MZ_ZIP_FILE_WRITE_FAILED, MZ_ZIP_FLAG_ASCII_FILENAME, MZ_ZIP_FLAG_COMPRESSED_DATA, MZ_ZIP_FLAG_WRITE_HEADER_SET_SIZE, MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_UTF8, MZ_ZIP_INTERNAL_ERROR, MZ_ZIP_INVALID_FILENAME, MZ_ZIP_INVALID_PARAMETER, MZ_ZIP_LDH_BIT_FLAG_HAS_LOCATOR, MZ_ZIP_LOCAL_DIR_HEADER_SIZE, MZ_ZIP_MAX_IO_BUF_SIZE, MZ_ZIP_MODE_WRITING, mz_zip_set_error(), mz_zip_time_t_to_dos_time(), MZ_ZIP_TOO_MANY_FILES, MZ_ZIP_UNSUPPORTED_CDIR_SIZE, mz_zip_writer_add_put_buf_callback(), mz_zip_writer_add_to_central_dir(), mz_zip_writer_compute_padding_needed_for_file_alignment(), mz_zip_writer_create_local_dir_header(), mz_zip_writer_create_zip64_extra_data(), mz_zip_writer_validate_archive_name(), mz_zip_writer_write_zeros(), n, NULL, result, tdefl_compress_buffer(), tdefl_create_comp_flags_from_zip_params(), TDEFL_FINISH, TDEFL_FULL_FLUSH, tdefl_init(), TDEFL_NO_FLUSH, TDEFL_STATUS_DONE, and TDEFL_STATUS_OKAY.

Referenced by mz_zip_writer_add_cfile().

◆ mz_zip_writer_add_to_central_dir()

static mz_bool mz_zip_writer_add_to_central_dir ( mz_zip_archive pZip,
const char *  pFilename,
mz_uint16  filename_size,
const void *  pExtra,
mz_uint16  extra_size,
const void *  pComment,
mz_uint16  comment_size,
mz_uint64  uncomp_size,
mz_uint64  comp_size,
mz_uint32  uncomp_crc32,
mz_uint16  method,
mz_uint16  bit_flags,
mz_uint16  dos_time,
mz_uint16  dos_date,
mz_uint64  local_header_ofs,
mz_uint32  ext_attributes,
const char *  user_extra_data,
mz_uint  user_extra_data_len 
)
static

◆ mz_zip_writer_compute_padding_needed_for_file_alignment()

static mz_uint mz_zip_writer_compute_padding_needed_for_file_alignment ( mz_zip_archive pZip)
static

◆ mz_zip_writer_create_central_dir_header()

static mz_bool mz_zip_writer_create_central_dir_header ( mz_zip_archive pZip,
mz_uint8 pDst,
mz_uint16  filename_size,
mz_uint16  extra_size,
mz_uint16  comment_size,
mz_uint64  uncomp_size,
mz_uint64  comp_size,
mz_uint32  uncomp_crc32,
mz_uint16  method,
mz_uint16  bit_flags,
mz_uint16  dos_time,
mz_uint16  dos_date,
mz_uint64  local_header_ofs,
mz_uint32  ext_attributes 
)
static

◆ mz_zip_writer_create_local_dir_header()

static mz_bool mz_zip_writer_create_local_dir_header ( mz_zip_archive pZip,
mz_uint8 pDst,
mz_uint16  filename_size,
mz_uint16  extra_size,
mz_uint64  uncomp_size,
mz_uint64  comp_size,
mz_uint32  uncomp_crc32,
mz_uint16  method,
mz_uint16  bit_flags,
mz_uint16  dos_time,
mz_uint16  dos_date 
)
static

◆ mz_zip_writer_create_zip64_extra_data()

static mz_uint32 mz_zip_writer_create_zip64_extra_data ( mz_uint8 pBuf,
mz_uint64 pUncomp_size,
mz_uint64 pComp_size,
mz_uint64 pLocal_header_ofs 
)
static

◆ mz_zip_writer_end()

mz_bool mz_zip_writer_end ( mz_zip_archive pZip)

Definition at line 7371 of file miniz.c.

References MZ_TRUE, and mz_zip_writer_end_internal().

Referenced by CArchiveZip::Close(), mz_zip_end(), and mz_zip_writer_init_file_v2().

◆ mz_zip_writer_end_internal()

static mz_bool mz_zip_writer_end_internal ( mz_zip_archive pZip,
mz_bool  set_last_error 
)
static

◆ mz_zip_writer_finalize_archive()

mz_bool mz_zip_writer_finalize_archive ( mz_zip_archive pZip)

Definition at line 7258 of file miniz.c.

References mz_zip_archive::m_archive_size, mz_zip_internal_state_tag::m_central_dir, mz_zip_archive::m_central_directory_file_ofs, mz_zip_array::m_p, mz_zip_internal_state_tag::m_pFile, mz_zip_archive::m_pIO_opaque, mz_zip_archive::m_pState, mz_zip_archive::m_pWrite, mz_zip_array::m_size, mz_zip_archive::m_total_files, mz_zip_internal_state_tag::m_zip64, mz_zip_archive::m_zip_mode, MZ_CLEAR_OBJ, MZ_FFLUSH, MZ_MIN, MZ_TRUE, MZ_UINT16_MAX, MZ_UINT32_MAX, MZ_WRITE_LE16, MZ_WRITE_LE32, MZ_WRITE_LE64, MZ_ZIP64_ECDH_CDIR_NUM_ENTRIES_ON_DISK_OFS, MZ_ZIP64_ECDH_CDIR_OFS_OFS, MZ_ZIP64_ECDH_CDIR_SIZE_OFS, MZ_ZIP64_ECDH_CDIR_TOTAL_ENTRIES_OFS, MZ_ZIP64_ECDH_SIG_OFS, MZ_ZIP64_ECDH_SIZE_OF_RECORD_OFS, MZ_ZIP64_ECDH_VERSION_MADE_BY_OFS, MZ_ZIP64_ECDH_VERSION_NEEDED_OFS, MZ_ZIP64_ECDL_REL_OFS_TO_ZIP64_ECDR_OFS, MZ_ZIP64_ECDL_SIG_OFS, MZ_ZIP64_ECDL_TOTAL_NUMBER_OF_DISKS_OFS, MZ_ZIP64_END_OF_CENTRAL_DIR_HEADER_SIG, MZ_ZIP64_END_OF_CENTRAL_DIR_HEADER_SIZE, MZ_ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIG, MZ_ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIZE, MZ_ZIP_ECDH_CDIR_NUM_ENTRIES_ON_DISK_OFS, MZ_ZIP_ECDH_CDIR_OFS_OFS, MZ_ZIP_ECDH_CDIR_SIZE_OFS, MZ_ZIP_ECDH_CDIR_TOTAL_ENTRIES_OFS, MZ_ZIP_ECDH_SIG_OFS, MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIG, MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE, MZ_ZIP_FILE_CLOSE_FAILED, MZ_ZIP_FILE_WRITE_FAILED, MZ_ZIP_INVALID_PARAMETER, MZ_ZIP_MODE_WRITING, MZ_ZIP_MODE_WRITING_HAS_BEEN_FINALIZED, mz_zip_set_error(), and MZ_ZIP_TOO_MANY_FILES.

Referenced by CArchiveZip::Close(), mz_zip_add_mem_to_archive_file_in_place_v2(), and mz_zip_writer_finalize_heap_archive().

◆ mz_zip_writer_finalize_heap_archive()

mz_bool mz_zip_writer_finalize_heap_archive ( mz_zip_archive pZip,
void **  ppBuf,
size_t *  pSize 
)

◆ mz_zip_writer_init()

mz_bool mz_zip_writer_init ( mz_zip_archive pZip,
mz_uint64  existing_size 
)

Definition at line 5711 of file miniz.c.

References mz_zip_writer_init_v2().

◆ mz_zip_writer_init_cfile()

mz_bool mz_zip_writer_init_cfile ( mz_zip_archive pZip,
FILE *  pFile,
mz_uint  flags 
)

◆ mz_zip_writer_init_file()

mz_bool mz_zip_writer_init_file ( mz_zip_archive pZip,
const char *  pFilename,
mz_uint64  size_to_reserve_at_beginning 
)

Definition at line 5769 of file miniz.c.

References mz_zip_writer_init_file_v2().

Referenced by CArchiveZip::CreateFile().

◆ mz_zip_writer_init_file_v2()

mz_bool mz_zip_writer_init_file_v2 ( mz_zip_archive pZip,
const char *  pFilename,
mz_uint64  size_to_reserve_at_beginning,
mz_uint  flags 
)

◆ mz_zip_writer_init_from_reader()

mz_bool mz_zip_writer_init_from_reader ( mz_zip_archive pZip,
const char *  pFilename 
)

Definition at line 5929 of file miniz.c.

References mz_zip_writer_init_from_reader_v2().

◆ mz_zip_writer_init_from_reader_v2()

mz_bool mz_zip_writer_init_from_reader_v2 ( mz_zip_archive pZip,
const char *  pFilename,
mz_uint  flags 
)

◆ mz_zip_writer_init_heap()

mz_bool mz_zip_writer_init_heap ( mz_zip_archive pZip,
size_t  size_to_reserve_at_beginning,
size_t  initial_allocation_size 
)

Definition at line 5744 of file miniz.c.

References mz_zip_writer_init_heap_v2().

Referenced by CArchiveZip::CreateMemory().

◆ mz_zip_writer_init_heap_v2()

mz_bool mz_zip_writer_init_heap_v2 ( mz_zip_archive pZip,
size_t  size_to_reserve_at_beginning,
size_t  initial_allocation_size,
mz_uint  flags 
)

◆ mz_zip_writer_init_v2()

mz_bool mz_zip_writer_init_v2 ( mz_zip_archive pZip,
mz_uint64  existing_size,
mz_uint  flags 
)

◆ mz_zip_writer_update_zip64_extension_block()

static mz_bool mz_zip_writer_update_zip64_extension_block ( mz_zip_array pNew_ext,
mz_zip_archive pZip,
const mz_uint8 pExt,
uint32_t  ext_len,
mz_uint64 pComp_size,
mz_uint64 pUncomp_size,
mz_uint64 pLocal_header_ofs,
mz_uint32 pDisk_start 
)
static

◆ mz_zip_writer_validate_archive_name()

static mz_bool mz_zip_writer_validate_archive_name ( const char *  pArchive_name)
static

◆ mz_zip_writer_write_zeros()

static mz_bool mz_zip_writer_write_zeros ( mz_zip_archive pZip,
mz_uint64  cur_file_ofs,
mz_uint32  n 
)
static

◆ mz_zip_zero_struct()

void mz_zip_zero_struct ( mz_zip_archive pZip)

◆ tdefl_calculate_minimum_redundancy()

static void tdefl_calculate_minimum_redundancy ( tdefl_sym_freq A,
int  n 
)
static

Definition at line 777 of file miniz.c.

References leaf(), tdefl_sym_freq::m_key, n, and next().

Referenced by tdefl_optimize_huffman_table().

◆ tdefl_compress()

tdefl_status tdefl_compress ( tdefl_compressor d,
const void *  pIn_buf,
size_t *  pIn_buf_size,
void *  pOut_buf,
size_t *  pOut_buf_size,
tdefl_flush  flush 
)

◆ tdefl_compress_block()

static mz_bool tdefl_compress_block ( tdefl_compressor d,
mz_bool  static_block 
)
static

◆ tdefl_compress_buffer()

tdefl_status tdefl_compress_buffer ( tdefl_compressor d,
const void *  pIn_buf,
size_t  in_buf_size,
tdefl_flush  flush 
)

◆ tdefl_compress_lz_codes()

static mz_bool tdefl_compress_lz_codes ( tdefl_compressor d)
static

◆ tdefl_compress_mem_to_heap()

void* tdefl_compress_mem_to_heap ( const void *  pSrc_buf,
size_t  src_buf_len,
size_t *  pOut_len,
int  flags 
)

◆ tdefl_compress_mem_to_mem()

size_t tdefl_compress_mem_to_mem ( void *  pOut_buf,
size_t  out_buf_len,
const void *  pSrc_buf,
size_t  src_buf_len,
int  flags 
)

◆ tdefl_compress_mem_to_output()

mz_bool tdefl_compress_mem_to_output ( const void *  pBuf,
size_t  buf_len,
tdefl_put_buf_func_ptr  pPut_buf_func,
void *  pPut_buf_user,
int  flags 
)

◆ tdefl_compress_normal()

static mz_bool tdefl_compress_normal ( tdefl_compressor d)
static

◆ tdefl_compressor_alloc()

tdefl_compressor* tdefl_compressor_alloc ( void  )

Definition at line 2200 of file miniz.c.

References MZ_MALLOC.

◆ tdefl_compressor_free()

void tdefl_compressor_free ( tdefl_compressor pComp)

Definition at line 2205 of file miniz.c.

References MZ_FREE.

◆ tdefl_create_comp_flags_from_zip_params()

mz_uint tdefl_create_comp_flags_from_zip_params ( int  level,
int  window_bits,
int  strategy 
)

◆ tdefl_find_match()

static void tdefl_find_match ( tdefl_compressor d,
mz_uint  lookahead_pos,
mz_uint  max_dist,
mz_uint  max_match_len,
mz_uint pMatch_dist,
mz_uint pMatch_len 
)
inlinestatic

◆ tdefl_flush_block()

static int tdefl_flush_block ( tdefl_compressor d,
int  flush 
)
static

◆ tdefl_flush_output_buffer()

static tdefl_status tdefl_flush_output_buffer ( tdefl_compressor d)
static

◆ tdefl_get_adler32()

mz_uint32 tdefl_get_adler32 ( tdefl_compressor d)

Definition at line 2001 of file miniz.c.

References tdefl_compressor::m_adler32.

◆ tdefl_get_prev_return_status()

tdefl_status tdefl_get_prev_return_status ( tdefl_compressor d)

Definition at line 1996 of file miniz.c.

References tdefl_compressor::m_prev_return_status.

◆ tdefl_huffman_enforce_max_code_size()

static void tdefl_huffman_enforce_max_code_size ( int pNum_codes,
int  code_list_len,
int  max_code_size 
)
static

Definition at line 837 of file miniz.c.

References i, and TDEFL_MAX_SUPPORTED_HUFF_CODESIZE.

Referenced by tdefl_optimize_huffman_table().

◆ tdefl_init()

tdefl_status tdefl_init ( tdefl_compressor d,
tdefl_put_buf_func_ptr  pPut_buf_func,
void *  pPut_buf_user,
int  flags 
)

Definition at line 1960 of file miniz.c.

References flags, tdefl_compressor::m_adler32, tdefl_compressor::m_bit_buffer, tdefl_compressor::m_bits_in, tdefl_compressor::m_block_index, tdefl_compressor::m_dict, tdefl_compressor::m_dict_size, tdefl_compressor::m_finished, tdefl_compressor::m_flags, tdefl_compressor::m_flush, tdefl_compressor::m_greedy_parsing, tdefl_compressor::m_hash, tdefl_compressor::m_huff_count, tdefl_compressor::m_lookahead_pos, tdefl_compressor::m_lookahead_size, tdefl_compressor::m_lz_code_buf, tdefl_compressor::m_lz_code_buf_dict_pos, tdefl_compressor::m_max_probes, tdefl_compressor::m_num_flags_left, tdefl_compressor::m_out_buf_ofs, tdefl_compressor::m_output_buf, tdefl_compressor::m_output_flush_ofs, tdefl_compressor::m_output_flush_remaining, tdefl_compressor::m_pIn_buf, tdefl_compressor::m_pIn_buf_size, tdefl_compressor::m_pLZ_code_buf, tdefl_compressor::m_pLZ_flags, tdefl_compressor::m_pOut_buf, tdefl_compressor::m_pOut_buf_size, tdefl_compressor::m_pOutput_buf, tdefl_compressor::m_pOutput_buf_end, tdefl_compressor::m_pPut_buf_func, tdefl_compressor::m_pPut_buf_user, tdefl_compressor::m_prev_return_status, tdefl_compressor::m_pSrc, tdefl_compressor::m_saved_lit, tdefl_compressor::m_saved_match_dist, tdefl_compressor::m_saved_match_len, tdefl_compressor::m_src_buf_left, tdefl_compressor::m_total_lz_bytes, tdefl_compressor::m_wants_to_finish, MZ_CLEAR_OBJ, NULL, TDEFL_GREEDY_PARSING_FLAG, TDEFL_MAX_HUFF_SYMBOLS_0, TDEFL_MAX_HUFF_SYMBOLS_1, TDEFL_NO_FLUSH, TDEFL_NONDETERMINISTIC_PARSING_FLAG, and TDEFL_STATUS_OKAY.

Referenced by mz_zip_writer_add_mem_ex_v2(), mz_zip_writer_add_read_buf_callback(), tdefl_compress_mem_to_output(), and tdefl_write_image_to_png_file_in_memory_ex().

◆ tdefl_optimize_huffman_table()

static void tdefl_optimize_huffman_table ( tdefl_compressor d,
int  table_num,
int  table_len,
int  code_size_limit,
int  static_table 
)
static

◆ tdefl_output_buffer_putter()

static mz_bool tdefl_output_buffer_putter ( const void *  pBuf,
int  len,
void *  pUser 
)
static

◆ tdefl_radix_sort_syms()

static tdefl_sym_freq* tdefl_radix_sort_syms ( mz_uint  num_syms,
tdefl_sym_freq pSyms0,
tdefl_sym_freq pSyms1 
)
static

Definition at line 743 of file miniz.c.

References i, tdefl_sym_freq::m_key, MZ_CLEAR_OBJ, and t.

Referenced by tdefl_optimize_huffman_table().

◆ tdefl_record_literal()

static void tdefl_record_literal ( tdefl_compressor d,
mz_uint8  lit 
)
inlinestatic

◆ tdefl_record_match()

static void tdefl_record_match ( tdefl_compressor d,
mz_uint  match_len,
mz_uint  match_dist 
)
inlinestatic

◆ tdefl_start_dynamic_block()

static void tdefl_start_dynamic_block ( tdefl_compressor d)
static

◆ tdefl_start_static_block()

static void tdefl_start_static_block ( tdefl_compressor d)
static

◆ tdefl_write_image_to_png_file_in_memory()

void* tdefl_write_image_to_png_file_in_memory ( const void *  pImage,
int  w,
int  h,
int  num_chans,
size_t *  pLen_out 
)

Definition at line 2190 of file miniz.c.

References MZ_FALSE, and tdefl_write_image_to_png_file_in_memory_ex().

◆ tdefl_write_image_to_png_file_in_memory_ex()

void* tdefl_write_image_to_png_file_in_memory_ex ( const void *  pImage,
int  w,
int  h,
int  num_chans,
size_t *  pLen_out,
mz_uint  level,
mz_bool  flip 
)

◆ tinfl_decompress()

tinfl_status tinfl_decompress ( tinfl_decompressor r,
const mz_uint8 pIn_buf_next,
size_t *  pIn_buf_size,
mz_uint8 pOut_buf_start,
mz_uint8 pOut_buf_next,
size_t *  pOut_buf_size,
const mz_uint32  decomp_flags 
)

◆ tinfl_decompress_mem_to_callback()

int tinfl_decompress_mem_to_callback ( const void *  pIn_buf,
size_t *  pIn_buf_size,
tinfl_put_buf_func_ptr  pPut_buf_func,
void *  pPut_buf_user,
int  flags 
)

◆ tinfl_decompress_mem_to_heap()

void* tinfl_decompress_mem_to_heap ( const void *  pSrc_buf,
size_t  src_buf_len,
size_t *  pOut_len,
int  flags 
)

◆ tinfl_decompress_mem_to_mem()

size_t tinfl_decompress_mem_to_mem ( void *  pOut_buf,
size_t  out_buf_len,
const void *  pSrc_buf,
size_t  src_buf_len,
int  flags 
)

◆ tinfl_decompressor_alloc()

tinfl_decompressor* tinfl_decompressor_alloc ( void  )

Definition at line 2950 of file miniz.c.

References MZ_MALLOC, and tinfl_init.

◆ tinfl_decompressor_free()

void tinfl_decompressor_free ( tinfl_decompressor pDecomp)

Definition at line 2958 of file miniz.c.

References MZ_FREE.

Variable Documentation

◆ mz_bitmasks

const mz_uint mz_bitmasks[17] = { 0x0000, 0x0001, 0x0003, 0x0007, 0x000F, 0x001F, 0x003F, 0x007F, 0x00FF, 0x01FF, 0x03FF, 0x07FF, 0x0FFF, 0x1FFF, 0x3FFF, 0x7FFF, 0xFFFF }
static

Definition at line 1089 of file miniz.c.

Referenced by tdefl_compress_lz_codes().

◆ s_tdefl_large_dist_extra

const mz_uint8 s_tdefl_large_dist_extra[128]
static
Initial value:
=
{
0, 0, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13
}

Definition at line 731 of file miniz.c.

Referenced by tdefl_compress_lz_codes().

◆ s_tdefl_large_dist_sym

const mz_uint8 s_tdefl_large_dist_sym[128]
static
Initial value:
=
{
0, 0, 18, 19, 20, 20, 21, 21, 22, 22, 22, 22, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 25, 25, 25, 25, 25, 25, 25, 25, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
28, 28, 28, 28, 28, 28, 28, 28, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29
}

Definition at line 724 of file miniz.c.

Referenced by tdefl_compress_lz_codes(), and tdefl_record_match().

◆ s_tdefl_len_extra

const mz_uint8 s_tdefl_len_extra[256]
static
Initial value:
=
{
0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0
}

Definition at line 688 of file miniz.c.

Referenced by tdefl_compress_lz_codes().

◆ s_tdefl_len_sym

const mz_uint16 s_tdefl_len_sym[256]
static
Initial value:
=
{
257, 258, 259, 260, 261, 262, 263, 264, 265, 265, 266, 266, 267, 267, 268, 268, 269, 269, 269, 269, 270, 270, 270, 270, 271, 271, 271, 271, 272, 272, 272, 272,
273, 273, 273, 273, 273, 273, 273, 273, 274, 274, 274, 274, 274, 274, 274, 274, 275, 275, 275, 275, 275, 275, 275, 275, 276, 276, 276, 276, 276, 276, 276, 276,
277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278,
279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280,
281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281,
282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282,
283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283,
284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 285
}

Definition at line 676 of file miniz.c.

Referenced by tdefl_compress_lz_codes(), and tdefl_record_match().

◆ s_tdefl_num_probes

const mz_uint s_tdefl_num_probes[11] = { 0, 1, 6, 32, 16, 32, 128, 256, 512, 768, 1500 }
static

Definition at line 2081 of file miniz.c.

Referenced by tdefl_create_comp_flags_from_zip_params().

◆ s_tdefl_packed_code_size_syms_swizzle

mz_uint8 s_tdefl_packed_code_size_syms_swizzle[] = { 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 }
static

Definition at line 978 of file miniz.c.

Referenced by tdefl_start_dynamic_block().

◆ s_tdefl_small_dist_extra

const mz_uint8 s_tdefl_small_dist_extra[512]
static
Initial value:
=
{
0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,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
static
Initial value:
=
{
0, 1, 2, 3, 4, 4, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11,
11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13,
13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17
}

Definition at line 696 of file miniz.c.

Referenced by tdefl_compress_lz_codes(), and tdefl_record_match().

Modified on Mon Jul 15 05:34:35 2024 by modify_doxy.py rev. 669887