PostgreSQL Source Code  git master
compression.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * compression.h
4  *
5  * Shared definitions for compression methods and specifications.
6  *
7  * Portions Copyright (c) 1996-2022, PostgreSQL Global Development Group
8  *
9  * IDENTIFICATION
10  * src/common/compression.h
11  *-------------------------------------------------------------------------
12  */
13 
14 #ifndef PG_COMPRESSION_H
15 #define PG_COMPRESSION_H
16 
18 {
24 
25 #define PG_COMPRESSION_OPTION_LEVEL (1 << 0)
26 #define PG_COMPRESSION_OPTION_WORKERS (1 << 1)
27 
29 {
31  unsigned options; /* OR of PG_COMPRESSION_OPTION constants */
32  int level;
33  int workers;
34  char *parse_error; /* NULL if parsing was OK, else message */
36 
37 extern bool parse_compress_algorithm(char *name, pg_compress_algorithm *algorithm);
38 extern const char *get_compress_algorithm_name(pg_compress_algorithm algorithm);
39 
41  char *specification,
43 
45 
46 #endif
struct pg_compress_specification pg_compress_specification
char * validate_compress_specification(pg_compress_specification *)
Definition: compression.c:250
pg_compress_algorithm
Definition: compression.h:18
@ PG_COMPRESSION_GZIP
Definition: compression.h:20
@ PG_COMPRESSION_LZ4
Definition: compression.h:21
@ PG_COMPRESSION_NONE
Definition: compression.h:19
@ PG_COMPRESSION_ZSTD
Definition: compression.h:22
bool parse_compress_algorithm(char *name, pg_compress_algorithm *algorithm)
Definition: compression.c:40
const char * get_compress_algorithm_name(pg_compress_algorithm algorithm)
Definition: compression.c:60
void parse_compress_specification(pg_compress_algorithm algorithm, char *specification, pg_compress_specification *result)
Definition: compression.c:95
const char * name
Definition: encode.c:561
pg_compress_algorithm algorithm
Definition: compression.h:30