zstd_preSplit.h 1.1 KB

123456789101112131415161718192021222324252627282930313233
  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. #ifndef ZSTD_PRESPLIT_H
  11. #define ZSTD_PRESPLIT_H
  12. #include <stddef.h> /* size_t */
  13. #define ZSTD_SLIPBLOCK_WORKSPACESIZE 8208
  14. /* ZSTD_splitBlock():
  15. * @level must be a value between 0 and 4.
  16. * higher levels spend more energy to detect block boundaries.
  17. * @workspace must be aligned for size_t.
  18. * @wkspSize must be at least >= ZSTD_SLIPBLOCK_WORKSPACESIZE
  19. * note:
  20. * For the time being, this function only accepts full 128 KB blocks.
  21. * Therefore, @blockSize must be == 128 KB.
  22. * While this could be extended to smaller sizes in the future,
  23. * it is not yet clear if this would be useful. TBD.
  24. */
  25. size_t ZSTD_splitBlock(const void* blockStart, size_t blockSize,
  26. int level,
  27. void* workspace, size_t wkspSize);
  28. #endif /* ZSTD_PRESPLIT_H */