|
KEEL 1.0.0
Minimal C11 HTTP client/server library built on epoll/kqueue/io_uring/poll
|
#include <decompress.h>
Data Fields | |
| int(* | decompress )(KlDecompress *self, const char *in, size_t in_len, char **out, size_t *out_len, KlAllocator *alloc) |
| Single-shot: decompress entire buffer into *out. | |
| int(* | dfeed )(KlDecompress *self, const char *data, size_t len, int flush, int(*emit)(void *ctx, const char *data, size_t len), void *emit_ctx) |
| Streaming: feed compressed input, emit decompressed output. | |
| const char *(* | encoding )(KlDecompress *self) |
| Content-Encoding value this decompressor handles, e.g. "gzip". | |
| void(* | reset )(KlDecompress *self) |
| Reset for reuse (may be NULL if not reusable). | |
| void(* | destroy )(KlDecompress *self) |
| Free all resources. | |
| int(* KlDecompress::decompress) (KlDecompress *self, const char *in, size_t in_len, char **out, size_t *out_len, KlAllocator *alloc) |
Single-shot: decompress entire buffer into *out.
Allocates output via alloc. Caller owns *out and must kl_free(alloc, *out, *out_len).
| self | Decompression session. |
| in | Compressed input data. |
| in_len | Input length. |
| out | Receives allocated decompressed output. |
| out_len | Receives decompressed output length. |
| alloc | Allocator for output buffer. |
| int(* KlDecompress::dfeed) (KlDecompress *self, const char *data, size_t len, int flush, int(*emit)(void *ctx, const char *data, size_t len), void *emit_ctx) |
Streaming: feed compressed input, emit decompressed output.
| self | Decompression session. |
| data | Compressed input data (NULL when flush=1 for final). |
| len | Input length (0 when flush=1 for final). |
| flush | 0 for intermediate chunks, 1 for final (validate trailer). |
| emit | Callback to receive decompressed output chunks. |
| emit_ctx | Context passed to emit callback. |
| const char *(* KlDecompress::encoding) (KlDecompress *self) |
Content-Encoding value this decompressor handles, e.g. "gzip".
| void(* KlDecompress::reset) (KlDecompress *self) |
Reset for reuse (may be NULL if not reusable).
| void(* KlDecompress::destroy) (KlDecompress *self) |
Free all resources.