Path: blob/master/Utilities/cmzstd/lib/compress/zstd_preSplit.h
4998 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_PRESPLIT_H11#define ZSTD_PRESPLIT_H1213#include <stddef.h> /* size_t */1415#define ZSTD_SLIPBLOCK_WORKSPACESIZE 82081617/* ZSTD_splitBlock():18* @level must be a value between 0 and 4.19* higher levels spend more energy to detect block boundaries.20* @workspace must be aligned for size_t.21* @wkspSize must be at least >= ZSTD_SLIPBLOCK_WORKSPACESIZE22* note:23* For the time being, this function only accepts full 128 KB blocks.24* Therefore, @blockSize must be == 128 KB.25* While this could be extended to smaller sizes in the future,26* it is not yet clear if this would be useful. TBD.27*/28size_t ZSTD_splitBlock(const void* blockStart, size_t blockSize,29int level,30void* workspace, size_t wkspSize);3132#endif /* ZSTD_PRESPLIT_H */333435