162306a36Sopenharmony_ci/* 262306a36Sopenharmony_ci * Copyright (c) Yann Collet, Facebook, Inc. 362306a36Sopenharmony_ci * All rights reserved. 462306a36Sopenharmony_ci * 562306a36Sopenharmony_ci * This source code is licensed under both the BSD-style license (found in the 662306a36Sopenharmony_ci * LICENSE file in the root directory of this source tree) and the GPLv2 (found 762306a36Sopenharmony_ci * in the COPYING file in the root directory of this source tree). 862306a36Sopenharmony_ci * You may select, at your option, one of the above-listed licenses. 962306a36Sopenharmony_ci */ 1062306a36Sopenharmony_ci 1162306a36Sopenharmony_ci#ifndef ZSTD_COMPRESS_LITERALS_H 1262306a36Sopenharmony_ci#define ZSTD_COMPRESS_LITERALS_H 1362306a36Sopenharmony_ci 1462306a36Sopenharmony_ci#include "zstd_compress_internal.h" /* ZSTD_hufCTables_t, ZSTD_minGain() */ 1562306a36Sopenharmony_ci 1662306a36Sopenharmony_ci 1762306a36Sopenharmony_cisize_t ZSTD_noCompressLiterals (void* dst, size_t dstCapacity, const void* src, size_t srcSize); 1862306a36Sopenharmony_ci 1962306a36Sopenharmony_cisize_t ZSTD_compressRleLiteralsBlock (void* dst, size_t dstCapacity, const void* src, size_t srcSize); 2062306a36Sopenharmony_ci 2162306a36Sopenharmony_ci/* If suspectUncompressible then some sampling checks will be run to potentially skip huffman coding */ 2262306a36Sopenharmony_cisize_t ZSTD_compressLiterals (ZSTD_hufCTables_t const* prevHuf, 2362306a36Sopenharmony_ci ZSTD_hufCTables_t* nextHuf, 2462306a36Sopenharmony_ci ZSTD_strategy strategy, int disableLiteralCompression, 2562306a36Sopenharmony_ci void* dst, size_t dstCapacity, 2662306a36Sopenharmony_ci const void* src, size_t srcSize, 2762306a36Sopenharmony_ci void* entropyWorkspace, size_t entropyWorkspaceSize, 2862306a36Sopenharmony_ci const int bmi2, 2962306a36Sopenharmony_ci unsigned suspectUncompressible); 3062306a36Sopenharmony_ci 3162306a36Sopenharmony_ci#endif /* ZSTD_COMPRESS_LITERALS_H */ 32