#include <stdlib.h>
#include <string.h>
#include "zipint.h"
struct context { … };
struct implementation { … };
static struct implementation implementations[] = …;
static size_t implementations_size = …;
static zip_source_t *compression_source_new(zip_t *za, zip_source_t *src, zip_int32_t method, bool compress, int compression_flags);
static zip_int64_t compress_callback(zip_source_t *, void *, void *, zip_uint64_t, zip_source_cmd_t);
static void context_free(struct context *ctx);
static struct context *context_new(zip_int32_t method, bool compress, int compression_flags, zip_compression_algorithm_t *algorithm);
static zip_int64_t compress_read(zip_source_t *, struct context *, void *, zip_uint64_t);
static zip_compression_algorithm_t *
get_algorithm(zip_int32_t method, bool compress) { … }
ZIP_EXTERN int
zip_compression_method_supported(zip_int32_t method, int compress) { … }
zip_source_t *
zip_source_compress(zip_t *za, zip_source_t *src, zip_int32_t method, int compression_flags) { … }
zip_source_t *
zip_source_decompress(zip_t *za, zip_source_t *src, zip_int32_t method) { … }
static zip_source_t *
compression_source_new(zip_t *za, zip_source_t *src, zip_int32_t method, bool compress, int compression_flags) { … }
static struct context *
context_new(zip_int32_t method, bool compress, int compression_flags, zip_compression_algorithm_t *algorithm) { … }
static void
context_free(struct context *ctx) { … }
static zip_int64_t
compress_read(zip_source_t *src, struct context *ctx, void *data, zip_uint64_t len) { … }
static zip_int64_t
compress_callback(zip_source_t *src, void *ud, void *data, zip_uint64_t len, zip_source_cmd_t cmd) { … }