1*65d1f550SNick Terrell /* SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause */ 2*65d1f550SNick Terrell /* 3*65d1f550SNick Terrell * Copyright (c) Meta Platforms, Inc. and affiliates. 4*65d1f550SNick Terrell * All rights reserved. 5*65d1f550SNick Terrell * 6*65d1f550SNick Terrell * This source code is licensed under both the BSD-style license (found in the 7*65d1f550SNick Terrell * LICENSE file in the root directory of this source tree) and the GPLv2 (found 8*65d1f550SNick Terrell * in the COPYING file in the root directory of this source tree). 9*65d1f550SNick Terrell * You may select, at your option, one of the above-listed licenses. 10*65d1f550SNick Terrell */ 11*65d1f550SNick Terrell 12*65d1f550SNick Terrell #ifndef ZSTD_PRESPLIT_H 13*65d1f550SNick Terrell #define ZSTD_PRESPLIT_H 14*65d1f550SNick Terrell 15*65d1f550SNick Terrell #include <linux/types.h> /* size_t */ 16*65d1f550SNick Terrell 17*65d1f550SNick Terrell #define ZSTD_SLIPBLOCK_WORKSPACESIZE 8208 18*65d1f550SNick Terrell 19*65d1f550SNick Terrell /* ZSTD_splitBlock(): 20*65d1f550SNick Terrell * @level must be a value between 0 and 4. 21*65d1f550SNick Terrell * higher levels spend more energy to detect block boundaries. 22*65d1f550SNick Terrell * @workspace must be aligned for size_t. 23*65d1f550SNick Terrell * @wkspSize must be at least >= ZSTD_SLIPBLOCK_WORKSPACESIZE 24*65d1f550SNick Terrell * note: 25*65d1f550SNick Terrell * For the time being, this function only accepts full 128 KB blocks. 26*65d1f550SNick Terrell * Therefore, @blockSize must be == 128 KB. 27*65d1f550SNick Terrell * While this could be extended to smaller sizes in the future, 28*65d1f550SNick Terrell * it is not yet clear if this would be useful. TBD. 29*65d1f550SNick Terrell */ 30*65d1f550SNick Terrell size_t ZSTD_splitBlock(const void* blockStart, size_t blockSize, 31*65d1f550SNick Terrell int level, 32*65d1f550SNick Terrell void* workspace, size_t wkspSize); 33*65d1f550SNick Terrell 34*65d1f550SNick Terrell #endif /* ZSTD_PRESPLIT_H */ 35