Path: blob/main/sys/contrib/openzfs/module/zstd/lib/compress/zstd_preSplit.h
178701 views
// SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0-only1/*2* Copyright (c) Meta Platforms, Inc. and affiliates.3* All rights reserved.4*5* This source code is licensed under both the BSD-style license (found in the6* LICENSE file in the root directory of this source tree) and the GPLv2 (found7* in the COPYING file in the root directory of this source tree).8* You may select, at your option, one of the above-listed licenses.9*/1011#ifndef ZSTD_PRESPLIT_H12#define ZSTD_PRESPLIT_H1314#include <stddef.h> /* size_t */1516#define ZSTD_SLIPBLOCK_WORKSPACESIZE 82081718/* ZSTD_splitBlock():19* @level must be a value between 0 and 4.20* higher levels spend more energy to detect block boundaries.21* @workspace must be aligned for size_t.22* @wkspSize must be at least >= ZSTD_SLIPBLOCK_WORKSPACESIZE23* note:24* For the time being, this function only accepts full 128 KB blocks.25* Therefore, @blockSize must be == 128 KB.26* While this could be extended to smaller sizes in the future,27* it is not yet clear if this would be useful. TBD.28*/29size_t ZSTD_splitBlock(const void* blockStart, size_t blockSize,30int level,31void* workspace, size_t wkspSize);3233#endif /* ZSTD_PRESPLIT_H */343536