#include "zipint.h"
#include <limits.h>
#include <stdlib.h>
#include <zstd.h>
#include <zstd_errors.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 int | map_error (size_t ret) |
|
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 59 of file zip_algorithm_zstd.c.
int ZEXPORT compress(Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen)
void * malloc(size_t size)
void error(const char *msg)
References ctx::compress, compress(), ctx::compression_flags, ctx::end_of_input, ctx::error, error(), ctx::in, malloc(), NULL, ctx::out, ctx::zcstream, and ctx::zdstream.
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 197 of file zip_algorithm_zstd.c.
203 ctx->
in.src = (
const void *)data;
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, ctx::in, length, SIZE_MAX, ZIP_ER_INVAL, and zip_error_set().
◆ map_error()
◆ maximum_compressed_size()
◆ process()
Definition at line 219 of file zip_algorithm_zstd.c.
248 if (ZSTD_isError(ret)) {
@ ZIP_COMPRESSION_NEED_DATA
References ctx::compress, ctx::end_of_input, ctx::error, ctx::in, length, map_error(), ctx::out, SIZE_MAX, ctx::zcstream, ctx::zdstream, ZIP_COMPRESSION_END, ZIP_COMPRESSION_ERROR, ZIP_COMPRESSION_NEED_DATA, ZIP_COMPRESSION_OK, zip_error_set(), and ZIP_MIN.
◆ start()
Definition at line 140 of file zip_algorithm_zstd.c.
156 if (ZSTD_isError(ret)) {
References ctx::compress, ctx::compression_flags, ctx::error, ctx::in, map_error(), NULL, ctx::out, ctx::zcstream, ctx::zdstream, ZIP_ER_MEMORY, ZIP_ER_ZLIB, and zip_error_set().
◆ zip_algorithm_zstd_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 267 of file zip_algorithm_zstd.c.
◆ zip_algorithm_zstd_decompress
Initial value:= {
20,
}
static void * decompress_allocate(zip_uint16_t method, int compression_flags, zip_error_t *error)
Definition at line 281 of file zip_algorithm_zstd.c.