MySQL 8.0.39
Source Code Documentation
my_compress.h File Reference

Go to the source code of this file.

Classes

struct  mysql_zlib_compress_context
 Compress context information. More...
 
struct  mysql_zstd_compress_context
 Compress context information relating to zstd compression. More...
 
struct  mysql_compress_context
 Compression context information. More...
 

Typedefs

typedef struct mysql_zlib_compress_context mysql_zlib_compress_context
 Compress context information. More...
 
typedef struct ZSTD_CCtx_s ZSTD_CCtx
 
typedef struct ZSTD_DCtx_s ZSTD_DCtx
 
typedef struct mysql_zstd_compress_context mysql_zstd_compress_context
 Compress context information relating to zstd compression. More...
 
typedef struct mysql_compress_context mysql_compress_context
 Compression context information. More...
 

Enumerations

enum  enum_compression_algorithm { MYSQL_UNCOMPRESSED = 1 , MYSQL_ZLIB , MYSQL_ZSTD , MYSQL_INVALID }
 

Functions

unsigned int mysql_default_compression_level (enum enum_compression_algorithm algorithm)
 Get default compression level corresponding to a given compression method. More...
 
void mysql_compress_context_init (mysql_compress_context *cmp_ctx, enum enum_compression_algorithm algorithm, unsigned int compression_level)
 Initialize a compress context object to be associated with a NET object. More...
 
void mysql_compress_context_deinit (mysql_compress_context *mysql_compress_ctx)
 Deinitialize the compression context allocated. More...
 

Typedef Documentation

◆ mysql_compress_context

Compression context information.

It encapsulate the context information based on compression method and presents a generic struct.

◆ mysql_zlib_compress_context

Compress context information.

relating to zlib compression.

◆ mysql_zstd_compress_context

Compress context information relating to zstd compression.

◆ ZSTD_CCtx

typedef struct ZSTD_CCtx_s ZSTD_CCtx

◆ ZSTD_DCtx

typedef struct ZSTD_DCtx_s ZSTD_DCtx

Enumeration Type Documentation

◆ enum_compression_algorithm

Enumerator
MYSQL_UNCOMPRESSED 
MYSQL_ZLIB 
MYSQL_ZSTD 
MYSQL_INVALID 

Function Documentation

◆ mysql_compress_context_deinit()

void mysql_compress_context_deinit ( mysql_compress_context mysql_compress_ctx)

Deinitialize the compression context allocated.

Parameters
mysql_compress_ctxPointer to Compression context.

◆ mysql_compress_context_init()

void mysql_compress_context_init ( mysql_compress_context cmp_ctx,
enum enum_compression_algorithm  algorithm,
unsigned int  compression_level 
)

Initialize a compress context object to be associated with a NET object.

Parameters
cmp_ctxPointer to compression context.
algorithmCompression algorithm.
compression_levelCompression level corresponding to the compression algorithm.

◆ mysql_default_compression_level()

unsigned int mysql_default_compression_level ( enum enum_compression_algorithm  algorithm)

Get default compression level corresponding to a given compression method.

Parameters
algorithmCompression Method. Possible values are zlib or zstd.
Returns
an unsigned int representing default compression level. 6 is the default compression level for zlib and 3 is the default compression level for zstd.