xref: /linux/lib/zstd/compress/zstd_compress_superblock.h (revision e61f33273ca755b3e2ebee4520a76097199dc7a8)
1 /* SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause */
2 /*
3  * Copyright (c) Meta Platforms, Inc. and affiliates.
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_ADVANCED_H
13 #define ZSTD_COMPRESS_ADVANCED_H
14 
15 /*-*************************************
16 *  Dependencies
17 ***************************************/
18 
19 #include <linux/zstd.h> /* ZSTD_CCtx */
20 
21 /*-*************************************
22 *  Target Compressed Block Size
23 ***************************************/
24 
25 /* ZSTD_compressSuperBlock() :
26  * Used to compress a super block when targetCBlockSize is being used.
27  * The given block will be compressed into multiple sub blocks that are around targetCBlockSize. */
28 size_t ZSTD_compressSuperBlock(ZSTD_CCtx* zc,
29                                void* dst, size_t dstCapacity,
30                                void const* src, size_t srcSize,
31                                unsigned lastBlock);
32 
33 #endif /* ZSTD_COMPRESS_ADVANCED_H */
34