#include "zipint.h"
#include <limits.h>
#include <stdlib.h>
#include <zlib.h>
Go to the source code of this file.
|
static zip_uint64_t | maximum_compressed_size (zip_uint64_t uncompressed_size) |
|
static void * | allocate (bool compress, int compression_flags, zip_error_t *error) |
|
static void * | compress_allocate (zip_uint16_t method, int compression_flags, zip_error_t *error) |
|
static void * | decompress_allocate (zip_uint16_t method, int compression_flags, zip_error_t *error) |
|
static void | deallocate (void *ud) |
|
static zip_uint16_t | general_purpose_bit_flags (void *ud) |
|
static bool | start (void *ud, zip_stat_t *st, zip_file_attributes_t *attributes) |
|
static bool | end (void *ud) |
|
static bool | input (void *ud, zip_uint8_t *data, zip_uint64_t length) |
|
static void | end_of_input (void *ud) |
|
static zip_compression_status_t | process (void *ud, zip_uint8_t *data, zip_uint64_t *length) |
|
◆ allocate()
Definition at line 63 of file zip_algorithm_deflate.c.
int ZEXPORT compress(Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen)
ZIP_EXTERN void zip_error_set(zip_error_t *_Nullable, int, int)
void * malloc(size_t size)
void error(const char *msg)
#define Z_BEST_COMPRESSION
References ctx::compress, compress(), ctx::compression_flags, ctx::end_of_input, ctx::error, error(), malloc(), NULL, Z_BEST_COMPRESSION, Z_NULL, zip_error_set(), ZIP_ET_SYS, and ctx::zstr.
Referenced by compress_allocate(), and decompress_allocate().
◆ compress_allocate()
◆ deallocate()
static void deallocate |
( |
void * |
ud | ) |
|
|
static |
◆ decompress_allocate()
◆ end()
static bool end |
( |
void * |
ud | ) |
|
|
static |
◆ end_of_input()
static void end_of_input |
( |
void * |
ud | ) |
|
|
static |
◆ general_purpose_bit_flags()
◆ input()
Definition at line 175 of file zip_algorithm_deflate.c.
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags static arg static fd static protocol static who struct sockaddr static addrlen static backlog struct timeval struct timezone static tz const struct iovec static count static mode const void const struct sockaddr static tolen const char static pathname void static offset struct stat static buf void long static basep static whence static length const void static len static semflg const void static shmflg const struct timespec struct timespec static rem const char static group const void length
References ctx::error, length, UINT_MAX, ZIP_ER_INVAL, zip_error_set(), and ctx::zstr.
◆ maximum_compressed_size()
◆ process()
Definition at line 199 of file zip_algorithm_deflate.c.
int ZEXPORT deflate(z_streamp strm, int flush)
int ZEXPORT inflate(z_streamp strm, int flush)
@ ZIP_COMPRESSION_NEED_DATA
References ctx::compress, deflate(), ctx::end_of_input, ctx::error, inflate(), length, UINT_MAX, Z_BUF_ERROR, Z_FINISH, Z_OK, Z_STREAM_END, Z_SYNC_FLUSH, ZIP_COMPRESSION_END, ZIP_COMPRESSION_ERROR, ZIP_COMPRESSION_NEED_DATA, ZIP_COMPRESSION_OK, ZIP_ER_ZLIB, zip_error_set(), ZIP_MIN, and ctx::zstr.
◆ start()
Definition at line 126 of file zip_algorithm_deflate.c.
#define Z_DEFAULT_STRATEGY
#define deflateInit2(strm, level, method, windowBits, memLevel, strategy)
#define inflateInit2(strm, windowBits)
References ctx::compress, ctx::compression_flags, deflateInit2, ctx::error, inflateInit2, MAX_MEM_LEVEL, MAX_WBITS, NULL, Z_DEFAULT_STRATEGY, Z_DEFLATED, Z_OK, ZIP_ER_ZLIB, zip_error_set(), and ctx::zstr.
◆ zip_algorithm_deflate_compress
Initial value:= {
20,
}
static zip_uint64_t maximum_compressed_size(zip_uint64_t uncompressed_size)
static void deallocate(void *ud)
static void * compress_allocate(zip_uint16_t method, int compression_flags, zip_error_t *error)
static bool start(void *ud, zip_stat_t *st, zip_file_attributes_t *attributes)
static bool end(void *ud)
static zip_uint16_t general_purpose_bit_flags(void *ud)
static void end_of_input(void *ud)
static bool input(void *ud, zip_uint8_t *data, zip_uint64_t length)
static zip_compression_status_t process(void *ud, zip_uint8_t *data, zip_uint64_t *length)
Definition at line 238 of file zip_algorithm_deflate.c.
◆ zip_algorithm_deflate_decompress
Initial value:= {
20,
}
static void * decompress_allocate(zip_uint16_t method, int compression_flags, zip_error_t *error)
Definition at line 252 of file zip_algorithm_deflate.c.