NeoMutt  2020-11-20
Teaching an old dog new tricks
DOXYGEN
ComprOps Struct Reference

Header Cache Compression API. More...

#include "lib.h"

Data Fields

const char * name
 Compression name. More...
 
short min_level
 Minimum compression level. More...
 
short max_level
 Maximum compression level. More...
 
void *(* open )(short level)
 Open a compression context. More...
 
void *(* compress )(void *cctx, const char *data, size_t dlen, size_t *clen)
 Compress header cache data. More...
 
void *(* decompress )(void *cctx, const char *cbuf, size_t clen)
 Decompress header cache data. More...
 
void(* close )(void **cctx)
 Close a compression context. More...
 

Detailed Description

Header Cache Compression API.

Definition at line 55 of file lib.h.

Field Documentation

◆ name

const char* ComprOps::name

Compression name.

Definition at line 57 of file lib.h.

◆ min_level

short ComprOps::min_level

Minimum compression level.

Definition at line 58 of file lib.h.

◆ max_level

short ComprOps::max_level

Maximum compression level.

Definition at line 59 of file lib.h.

◆ open

void*(* ComprOps::open) (short level)

Open a compression context.

Parameters
[in]levelThe compression level
Return values
ptrSuccess, backend-specific context
NULLOtherwise

Definition at line 67 of file lib.h.

◆ compress

void*(* ComprOps::compress) (void *cctx, const char *data, size_t dlen, size_t *clen)

Compress header cache data.

Parameters
[in]cctxCompression context
[in]dataData to be compressed
[in]dlenLength of the uncompressed data
[out]clenLength of returned compressed data
Return values
ptrSuccess, pointer to compressed data
NULLOtherwise
Note
This function returns a pointer to data, which will be freed by the close() function.

Definition at line 81 of file lib.h.

◆ decompress

void*(* ComprOps::decompress) (void *cctx, const char *cbuf, size_t clen)

Decompress header cache data.

Parameters
[in]cctxCompression context
[in]cbufData to be decompressed
[in]clenLength of the compressed input data
Return values
ptrSuccess, pointer to decompressed data
NULLOtherwise
Note
This function returns a pointer to data, which will be freed by the close() function.

Definition at line 94 of file lib.h.

◆ close

void(* ComprOps::close) (void **cctx)

Close a compression context.

Parameters
[out]cctxBackend-specific context retrieved via open()
Note
This function will free all allocated resources, which were allocated by open(), compress() or decompress()

Definition at line 103 of file lib.h.


The documentation for this struct was generated from the following file: