ZXC 1.0.3
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
15
16#ifndef ZXC_CONSTANTS_H
17#define ZXC_CONSTANTS_H
18
24
26#define ZXC_VERSION_MAJOR 1
28#define ZXC_VERSION_MINOR 0
30#define ZXC_VERSION_PATCH 3
32#define ZXC_VERSION_CODENAME "Hydrogen"
33
35#define ZXC_STR_HELPER(x) #x
36#define ZXC_STR(x) ZXC_STR_HELPER(x)
38
42#define ZXC_LIB_VERSION_STR \
43 ZXC_STR(ZXC_VERSION_MAJOR) \
44 "." ZXC_STR(ZXC_VERSION_MINOR) "." ZXC_STR(ZXC_VERSION_PATCH)
45
53#define ZXC_VERSION_NUMBER (ZXC_VERSION_MAJOR * 10000 + ZXC_VERSION_MINOR * 100 + ZXC_VERSION_PATCH)
54 /* end of version */
56
67#define ZXC_BLOCK_SIZE_MIN_LOG2 12
69#define ZXC_BLOCK_SIZE_MAX_LOG2 21
71#define ZXC_BLOCK_SIZE_DEFAULT (512 * 1024)
73#define ZXC_BLOCK_SIZE_MIN (1U << ZXC_BLOCK_SIZE_MIN_LOG2)
75#define ZXC_BLOCK_SIZE_MAX (1U << ZXC_BLOCK_SIZE_MAX_LOG2) /* end of block_size */
77
88#define ZXC_DICT_SIZE_MAX ((1U << 16) - 1U)
90#define ZXC_DICT_MAGIC 0x9CB0D1C7U
92#define ZXC_DICT_HEADER_SIZE 16
96#define ZXC_HUF_TABLE_SIZE 128 /* end of dictionary */
98
107#define ZXC_MAX_THREADS 512 /* end of threading */
109
117#define ZXC_MAGIC_WORD 0x9CB02EF5U
120#define ZXC_FILE_HEADER_SIZE 16
122#define ZXC_FILE_FOOTER_MIN_SIZE 3
125#define ZXC_FILE_FOOTER_MAX_SIZE 17
127#define ZXC_FILE_DIGEST_SIZE 8 /* end of file_format */
129
138
153 /* end of levels */
155
156#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.