xref: /freebsd/sys/contrib/openzfs/module/zstd/lib/compress/zstd_compress_literals.h (revision 61145dc2b94f12f6a47344fb9aac702321880e43)
1 // SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0-only
2 /*
3  * Copyright (c) 2016-2020, Yann Collet, Facebook, Inc.
4  * All rights reserved.
5  *
6  * This source code is licensed under both the BSD-style license (found in the
7  * LICENSE file in the root directory of this source tree) and the GPLv2 (found
8  * in the COPYING file in the root directory of this source tree).
9  * You may select, at your option, one of the above-listed licenses.
10  */
11 
12 #ifndef ZSTD_COMPRESS_LITERALS_H
13 #define ZSTD_COMPRESS_LITERALS_H
14 
15 #include "zstd_compress_internal.h" /* ZSTD_hufCTables_t, ZSTD_minGain() */
16 
17 
18 size_t ZSTD_noCompressLiterals (void* dst, size_t dstCapacity, const void* src, size_t srcSize);
19 
20 size_t ZSTD_compressRleLiteralsBlock (void* dst, size_t dstCapacity, const void* src, size_t srcSize);
21 
22 size_t ZSTD_compressLiterals (ZSTD_hufCTables_t const* prevHuf,
23                               ZSTD_hufCTables_t* nextHuf,
24                               ZSTD_strategy strategy, int disableLiteralCompression,
25                               void* dst, size_t dstCapacity,
26                         const void* src, size_t srcSize,
27                               void* entropyWorkspace, size_t entropyWorkspaceSize,
28                         const int bmi2);
29 
30 #endif /* ZSTD_COMPRESS_LITERALS_H */
31