NeoMutt  2022-04-29-215-gc12b98
Teaching an old dog new tricks
DOXYGEN
lib.h
Go to the documentation of this file.
1
49#ifndef MUTT_COMPRESS_LIB_H
50#define MUTT_COMPRESS_LIB_H
51
52#include <stdlib.h>
53
60{
61 const char *name;
62 short min_level;
63 short max_level;
64
74 void *(*open)(short level);
75
91 void *(*compress)(void *cctx, const char *data, size_t dlen, size_t *clen);
92
107 void *(*decompress)(void *cctx, const char *cbuf, size_t clen);
108
119 void (*close)(void **cctx);
120};
121
122extern const struct ComprOps compr_lz4_ops;
123extern const struct ComprOps compr_zlib_ops;
124extern const struct ComprOps compr_zstd_ops;
125
126const struct ComprOps *compress_get_ops(const char *compr);
127const char * compress_list (void);
128
129#endif /* MUTT_COMPRESS_LIB_H */
const char * compress_list(void)
Get a list of compression backend names.
Definition: compress.c:57
const struct ComprOps compr_zlib_ops
const struct ComprOps compr_lz4_ops
const struct ComprOps compr_zstd_ops
const struct ComprOps * compress_get_ops(const char *compr)
Get the API functions for a compress backend.
Definition: compress.c:80
Definition: lib.h:60
void(* close)(void **cctx)
Definition: lib.h:119
const char * name
Compression name.
Definition: lib.h:61
short max_level
Maximum compression level.
Definition: lib.h:63
short min_level
Minimum compression level.
Definition: lib.h:62