1e0c1b49fSNick Terrell /*
2e0c1b49fSNick Terrell  * Copyright (c) Yann Collet, Facebook, Inc.
3e0c1b49fSNick Terrell  * All rights reserved.
4e0c1b49fSNick Terrell  *
5e0c1b49fSNick Terrell  * This source code is licensed under both the BSD-style license (found in the
6e0c1b49fSNick Terrell  * LICENSE file in the root directory of this source tree) and the GPLv2 (found
7e0c1b49fSNick Terrell  * in the COPYING file in the root directory of this source tree).
8e0c1b49fSNick Terrell  * You may select, at your option, one of the above-listed licenses.
9e0c1b49fSNick Terrell  */
10e0c1b49fSNick Terrell 
11e0c1b49fSNick Terrell #ifndef ZSTD_COMPRESS_LITERALS_H
12e0c1b49fSNick Terrell #define ZSTD_COMPRESS_LITERALS_H
13e0c1b49fSNick Terrell 
14e0c1b49fSNick Terrell #include "zstd_compress_internal.h" /* ZSTD_hufCTables_t, ZSTD_minGain() */
15e0c1b49fSNick Terrell 
16e0c1b49fSNick Terrell 
17e0c1b49fSNick Terrell size_t ZSTD_noCompressLiterals (void* dst, size_t dstCapacity, const void* src, size_t srcSize);
18e0c1b49fSNick Terrell 
19e0c1b49fSNick Terrell size_t ZSTD_compressRleLiteralsBlock (void* dst, size_t dstCapacity, const void* src, size_t srcSize);
20e0c1b49fSNick Terrell 
21*2aa14b1aSNick Terrell /* If suspectUncompressible then some sampling checks will be run to potentially skip huffman coding */
22e0c1b49fSNick Terrell size_t ZSTD_compressLiterals (ZSTD_hufCTables_t const* prevHuf,
23e0c1b49fSNick Terrell                               ZSTD_hufCTables_t* nextHuf,
24e0c1b49fSNick Terrell                               ZSTD_strategy strategy, int disableLiteralCompression,
25e0c1b49fSNick Terrell                               void* dst, size_t dstCapacity,
26e0c1b49fSNick Terrell                         const void* src, size_t srcSize,
27e0c1b49fSNick Terrell                               void* entropyWorkspace, size_t entropyWorkspaceSize,
28*2aa14b1aSNick Terrell                         const int bmi2,
29*2aa14b1aSNick Terrell                         unsigned suspectUncompressible);
30e0c1b49fSNick Terrell 
31e0c1b49fSNick Terrell #endif /* ZSTD_COMPRESS_LITERALS_H */
32