0.2.0-dev Download ZIP
33 lines ·1.1 KB Raw
| 1 | /* |
| 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 the |
| 6 | * LICENSE file in the root directory of this source tree) and the GPLv2 (found |
| 7 | * 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 | */ |
| 10 | |
| 11 | #ifndef ZSTD_PRESPLIT_H |
| 12 | #define ZSTD_PRESPLIT_H |
| 13 | |
| 14 | #include <stddef.h> /* size_t */ |
| 15 | |
| 16 | #define ZSTD_SLIPBLOCK_WORKSPACESIZE 8208 |
| 17 | |
| 18 | /* 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_WORKSPACESIZE |
| 23 | * 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 | */ |
| 29 | size_t ZSTD_splitBlock(const void* blockStart, size_t blockSize, |
| 30 | int level, |
| 31 | void* workspace, size_t wkspSize); |
| 32 | |
| 33 | #endif /* ZSTD_PRESPLIT_H */ |