add faster block splitting heuristic, suitable for dfast strategy

This commit is contained in:
Yann Collet
2024-10-24 14:37:00 -07:00
parent 2366a87ddc
commit da2c0dffd8
3 changed files with 22 additions and 15 deletions
+3 -4
View File
@@ -17,11 +17,10 @@
extern "C" {
#endif
typedef enum { split_lvl1, split_lvl2, split_lvl3 } ZSTD_SplitBlock_strategy_e;
#define ZSTD_SLIPBLOCK_WORKSPACESIZE 8208
/* note:
/* @level must be a value between 0 and 3.
* higher levels spend more energy to find block boundaries
* @workspace must be aligned on 8-bytes boundaries
* @wkspSize must be at least >= ZSTD_SLIPBLOCK_WORKSPACESIZE
* note2:
@@ -30,7 +29,7 @@ typedef enum { split_lvl1, split_lvl2, split_lvl3 } ZSTD_SplitBlock_strategy_e;
* This could be extended to smaller sizes in the future.
*/
size_t ZSTD_splitBlock(const void* blockStart, size_t blockSize,
ZSTD_SplitBlock_strategy_e splitStrat,
int level,
void* workspace, size_t wkspSize);
#if defined (__cplusplus)