PostgreSQL Source Code
git master
|
Go to the source code of this file.
Data Structures | |
struct | PGLZ_HistEntry |
Macros | |
#define | PGLZ_MAX_HISTORY_LISTS 8192 /* must be power of 2 */ |
#define | PGLZ_HISTORY_SIZE 4096 |
#define | PGLZ_MAX_MATCH 273 |
#define | INVALID_ENTRY 0 |
#define | INVALID_ENTRY_PTR (&hist_entries[INVALID_ENTRY]) |
#define | pglz_hist_idx(_s, _e, _mask) |
#define | pglz_hist_add(_hs, _he, _hn, _recycle, _s, _e, _mask) |
#define | pglz_out_ctrl(__ctrlp, __ctrlb, __ctrl, __buf) |
#define | pglz_out_literal(_ctrlp, _ctrlb, _ctrl, _buf, _byte) |
#define | pglz_out_tag(_ctrlp, _ctrlb, _ctrl, _buf, _len, _off) |
Typedefs | |
typedef struct PGLZ_HistEntry | PGLZ_HistEntry |
Functions | |
static int | pglz_find_match (int16 *hstart, const char *input, const char *end, int *lenp, int *offp, int good_match, int good_drop, int mask) |
int32 | pglz_compress (const char *source, int32 slen, char *dest, const PGLZ_Strategy *strategy) |
int32 | pglz_decompress (const char *source, int32 slen, char *dest, int32 rawsize, bool check_complete) |
int32 | pglz_maximum_compressed_size (int32 rawsize, int32 total_compressed_size) |
Variables | |
static const PGLZ_Strategy | strategy_default_data |
const PGLZ_Strategy *const | PGLZ_strategy_default = &strategy_default_data |
static const PGLZ_Strategy | strategy_always_data |
const PGLZ_Strategy *const | PGLZ_strategy_always = &strategy_always_data |
static int16 | hist_start [PGLZ_MAX_HISTORY_LISTS] |
static PGLZ_HistEntry | hist_entries [PGLZ_HISTORY_SIZE+1] |
#define INVALID_ENTRY 0 |
Definition at line 262 of file pg_lzcompress.c.
#define INVALID_ENTRY_PTR (&hist_entries[INVALID_ENTRY]) |
Definition at line 263 of file pg_lzcompress.c.
#define pglz_hist_add | ( | _hs, | |
_he, | |||
_hn, | |||
_recycle, | |||
_s, | |||
_e, | |||
_mask | |||
) |
Definition at line 296 of file pg_lzcompress.c.
#define pglz_hist_idx | ( | _s, | |
_e, | |||
_mask | |||
) |
Definition at line 277 of file pg_lzcompress.c.
#define PGLZ_HISTORY_SIZE 4096 |
Definition at line 196 of file pg_lzcompress.c.
#define PGLZ_MAX_HISTORY_LISTS 8192 /* must be power of 2 */ |
Definition at line 195 of file pg_lzcompress.c.
#define PGLZ_MAX_MATCH 273 |
Definition at line 197 of file pg_lzcompress.c.
#define pglz_out_ctrl | ( | __ctrlp, | |
__ctrlb, | |||
__ctrl, | |||
__buf | |||
) |
Definition at line 336 of file pg_lzcompress.c.
#define pglz_out_literal | ( | _ctrlp, | |
_ctrlb, | |||
_ctrl, | |||
_buf, | |||
_byte | |||
) |
Definition at line 355 of file pg_lzcompress.c.
#define pglz_out_tag | ( | _ctrlp, | |
_ctrlb, | |||
_ctrl, | |||
_buf, | |||
_len, | |||
_off | |||
) |
Definition at line 371 of file pg_lzcompress.c.
typedef struct PGLZ_HistEntry PGLZ_HistEntry |
int32 pglz_compress | ( | const char * | source, |
int32 | slen, | ||
char * | dest, | ||
const PGLZ_Strategy * | strategy | ||
) |
Definition at line 509 of file pg_lzcompress.c.
References generate_unaccent_rules::dest, PGLZ_Strategy::first_success_by, hist_entries, hist_start, PGLZ_Strategy::match_size_drop, PGLZ_Strategy::match_size_good, PGLZ_Strategy::max_input_size, PGLZ_Strategy::min_comp_rate, pglz_find_match(), pglz_hist_add, PGLZ_MAX_MATCH, pglz_out_literal, pglz_out_tag, PGLZ_strategy_default, and source.
Referenced by pglz_compress_datum(), and XLogCompressBackupBlock().
int32 pglz_decompress | ( | const char * | source, |
int32 | slen, | ||
char * | dest, | ||
int32 | rawsize, | ||
bool | check_complete | ||
) |
Definition at line 692 of file pg_lzcompress.c.
References generate_unaccent_rules::dest, len, Min, source, and unlikely.
Referenced by pglz_decompress_datum(), pglz_decompress_datum_slice(), and RestoreBlockImage().
|
inlinestatic |
Definition at line 399 of file pg_lzcompress.c.
References hist_entries, input, INVALID_ENTRY_PTR, len, PGLZ_HistEntry::next, pglz_hist_idx, PGLZ_MAX_MATCH, and PGLZ_HistEntry::pos.
Referenced by pglz_compress().
|
static |
Definition at line 256 of file pg_lzcompress.c.
Referenced by pglz_compress(), and pglz_find_match().
|
static |
Definition at line 255 of file pg_lzcompress.c.
Referenced by pglz_compress().
const PGLZ_Strategy* const PGLZ_strategy_always = &strategy_always_data |
Definition at line 248 of file pg_lzcompress.c.
const PGLZ_Strategy* const PGLZ_strategy_default = &strategy_default_data |
Definition at line 236 of file pg_lzcompress.c.
Referenced by pglz_compress(), pglz_compress_datum(), and XLogCompressBackupBlock().
|
static |
Definition at line 239 of file pg_lzcompress.c.
|
static |
Definition at line 223 of file pg_lzcompress.c.