NeoMutt  2024-04-25-89-g194907
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
lib.h
Go to the documentation of this file.
1
50#ifndef MUTT_COMPRESS_LIB_H
51#define MUTT_COMPRESS_LIB_H
52
53#include <stdlib.h>
54
56typedef void ComprHandle;
57
64{
65 const char *name;
66 short min_level;
67 short max_level;
68
78 ComprHandle *(*open)(short level);
79
95 void *(*compress)(ComprHandle *handle, const char *data, size_t dlen, size_t *clen);
96
111 void *(*decompress)(ComprHandle *handle, const char *cbuf, size_t clen);
112
123 void (*close)(ComprHandle **ptr);
124};
125
126extern const struct ComprOps compr_lz4_ops;
127extern const struct ComprOps compr_zlib_ops;
128extern const struct ComprOps compr_zstd_ops;
129
130const struct ComprOps *compress_get_ops(const char *compr);
131const char * compress_list (void);
132
133#endif /* MUTT_COMPRESS_LIB_H */
const char * compress_list(void)
Get a list of compression backend names.
Definition: compress.c:58
const struct ComprOps compr_zlib_ops
void ComprHandle
Opaque type for compression data.
Definition: lib.h:56
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:81
Definition: lib.h:64
const char * name
Compression name.
Definition: lib.h:65
short max_level
Maximum compression level.
Definition: lib.h:67
short min_level
Minimum compression level.
Definition: lib.h:66
void(* close)(ComprHandle **ptr)
Definition: lib.h:123