Path: blob/master/Utilities/cmzstd/lib/compress/zstd_compress_literals.h
3158 views
/*1* Copyright (c) Meta Platforms, Inc. and affiliates.2* All rights reserved.3*4* This source code is licensed under both the BSD-style license (found in the5* LICENSE file in the root directory of this source tree) and the GPLv2 (found6* in the COPYING file in the root directory of this source tree).7* You may select, at your option, one of the above-listed licenses.8*/910#ifndef ZSTD_COMPRESS_LITERALS_H11#define ZSTD_COMPRESS_LITERALS_H1213#include "zstd_compress_internal.h" /* ZSTD_hufCTables_t, ZSTD_minGain() */141516size_t ZSTD_noCompressLiterals (void* dst, size_t dstCapacity, const void* src, size_t srcSize);1718/* ZSTD_compressRleLiteralsBlock() :19* Conditions :20* - All bytes in @src are identical21* - dstCapacity >= 4 */22size_t ZSTD_compressRleLiteralsBlock (void* dst, size_t dstCapacity, const void* src, size_t srcSize);2324/* ZSTD_compressLiterals():25* @entropyWorkspace: must be aligned on 4-bytes boundaries26* @entropyWorkspaceSize : must be >= HUF_WORKSPACE_SIZE27* @suspectUncompressible: sampling checks, to potentially skip huffman coding28*/29size_t ZSTD_compressLiterals (void* dst, size_t dstCapacity,30const void* src, size_t srcSize,31void* entropyWorkspace, size_t entropyWorkspaceSize,32const ZSTD_hufCTables_t* prevHuf,33ZSTD_hufCTables_t* nextHuf,34ZSTD_strategy strategy, int disableLiteralCompression,35int suspectUncompressible,36int bmi2);3738#endif /* ZSTD_COMPRESS_LITERALS_H */394041