ZXC 0.15.0
High-performance asymmetric lossless compression library
Loading...
Searching...
No Matches
zxc_constants.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-3-Clause */
2/*
3 * ZXC - High-performance lossless compression
4 *
5 * Copyright (c) Bertrand Lebonnois and contributors.
6 */
7
16#ifndef ZXC_CONSTANTS_H
17#define ZXC_CONSTANTS_H
18
26#define ZXC_VERSION_MAJOR 0
28#define ZXC_VERSION_MINOR 15
30#define ZXC_VERSION_PATCH 0
31
33#define ZXC_STR_HELPER(x) #x
34#define ZXC_STR(x) ZXC_STR_HELPER(x)
40#define ZXC_LIB_VERSION_STR \
41 ZXC_STR(ZXC_VERSION_MAJOR) \
42 "." ZXC_STR(ZXC_VERSION_MINOR) "." ZXC_STR(ZXC_VERSION_PATCH)
43
/* end of version */
45
56#define ZXC_BLOCK_SIZE_MIN_LOG2 12
58#define ZXC_BLOCK_SIZE_MAX_LOG2 21
60#define ZXC_BLOCK_SIZE_DEFAULT (512 * 1024)
62#define ZXC_BLOCK_SIZE_MIN (1U << ZXC_BLOCK_SIZE_MIN_LOG2)
64#define ZXC_BLOCK_SIZE_MAX (1U << ZXC_BLOCK_SIZE_MAX_LOG2)
/* end of block_size */
66
77#define ZXC_DICT_SIZE_MAX ((1U << 16) - 1U)
79#define ZXC_DICT_MAGIC 0x9CB0D1C7U
81#define ZXC_DICT_HEADER_SIZE 16
85#define ZXC_HUF_TABLE_SIZE 128
/* end of dictionary */
87
95#define ZXC_MAX_THREADS 512
/* end of threading */
97
105#define ZXC_MAGIC_WORD 0x9CB02EF5U
108#define ZXC_FILE_HEADER_SIZE 16
110#define ZXC_FILE_FOOTER_MIN_SIZE 3
113#define ZXC_FILE_FOOTER_MAX_SIZE 17
115#define ZXC_FILE_DIGEST_SIZE 8
/* end of file_format */
117
141
/* end of levels */
143
144#endif // ZXC_CONSTANTS_H
zxc_compression_level_t
ZXC compression levels.
@ ZXC_LEVEL_ULTRA
Maximum density: Huffman-coded literals and sequence tokens.
@ ZXC_LEVEL_DEFAULT
Recommended default: better ratio and decode speed than LZ4.
@ ZXC_LEVEL_COMPACT
Denser encoding.
@ ZXC_LEVEL_FASTEST
Fastest compression; lowest ratio.
@ ZXC_LEVEL_DENSITY
Higher density: adds Huffman-coded literals on top of COMPACT.
@ ZXC_LEVEL_BALANCED
Balanced trade-off between ratio and decode speed.
@ ZXC_LEVEL_FAST
Fast compression; slightly better ratio than FASTEST.