Skip to main content

ZSTD_splitBlock

Function ZSTD_splitBlock 

Source
pub unsafe fn ZSTD_splitBlock(
    blockStart: *const c_void,
    blockSize: size_t,
    level: c_int,
    workspace: *mut c_void,
    wkspSize: size_t,
) -> size_t
Expand description

Splits a block to find the optimal boundary for compression.

§Parameters

  • blockStart - Pointer to the start of the block
  • blockSize - Size of the block (must be 128 KB)
  • level - Detection level (0-4). Higher levels spend more energy to detect block boundaries.
  • workspace - Workspace buffer (must be aligned for size_t)
  • wkspSize - Workspace size (must be at least ZSTD_SLIPBLOCK_WORKSPACESIZE)

§Note

For the time being, this function only accepts full 128 KB blocks. While this could be extended to smaller sizes in the future, it is not yet clear if this would be useful. TBD.