added a faster block splitter variant

that samples 1 in 5 positions.

This variant is fast enough for lazy2 and btlazy2,
but it's less good in combination with post-splitter at higher levels (>= btopt).
This commit is contained in:
Yann Collet
2024-10-23 11:50:57 -07:00
parent 1c62e714ab
commit a167571db5
3 changed files with 46 additions and 16 deletions
+5 -1
View File
@@ -17,6 +17,8 @@
extern "C" {
#endif
typedef enum { split_lvl1, split_lvl2 } ZSTD_SplitBlock_strategy_e;
#define ZSTD_SLIPBLOCK_WORKSPACESIZE 8208
/* note:
@@ -27,7 +29,9 @@ extern "C" {
* therefore @blockSizeMax must be == 128 KB.
* This could be extended to smaller sizes in the future.
*/
size_t ZSTD_splitBlock_4k(const void* src, size_t srcSize, size_t blockSizeMax, void* workspace, size_t wkspSize);
size_t ZSTD_splitBlock(const void* src, size_t srcSize,
size_t blockSizeMax, ZSTD_SplitBlock_strategy_e splitStrat,
void* workspace, size_t wkspSize);
#if defined (__cplusplus)
}