Allow HASH_ONLY_EVERY_LOG to be configured in ldm.h
This commit is contained in:
@@ -16,11 +16,11 @@
|
|||||||
#define LDM_HASH_ENTRY_SIZE_LOG 2
|
#define LDM_HASH_ENTRY_SIZE_LOG 2
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Force the "probability" of insertion to be some value.
|
|
||||||
// Entries are inserted into the table HASH_ONLY_EVERY + 1 times "on average".
|
// Entries are inserted into the table HASH_ONLY_EVERY + 1 times "on average".
|
||||||
|
#ifndef HASH_ONLY_EVERY_LOG
|
||||||
//#define HASH_ONLY_EVERY_LOG 7
|
|
||||||
#define HASH_ONLY_EVERY_LOG (LDM_WINDOW_SIZE_LOG-((LDM_MEMORY_USAGE)-(LDM_HASH_ENTRY_SIZE_LOG)))
|
#define HASH_ONLY_EVERY_LOG (LDM_WINDOW_SIZE_LOG-((LDM_MEMORY_USAGE)-(LDM_HASH_ENTRY_SIZE_LOG)))
|
||||||
|
#endif
|
||||||
|
|
||||||
#define HASH_ONLY_EVERY ((1 << (HASH_ONLY_EVERY_LOG)) - 1)
|
#define HASH_ONLY_EVERY ((1 << (HASH_ONLY_EVERY_LOG)) - 1)
|
||||||
|
|
||||||
#define HASH_BUCKET_SIZE (1 << (HASH_BUCKET_SIZE_LOG))
|
#define HASH_BUCKET_SIZE (1 << (HASH_BUCKET_SIZE_LOG))
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
#define LDM_LAG 0
|
#define LDM_LAG 0
|
||||||
|
|
||||||
// The maximum window size when searching for matches.
|
// The maximum window size when searching for matches.
|
||||||
// The maximum value is 30.
|
// The maximum value is 30
|
||||||
#define LDM_WINDOW_SIZE_LOG 28
|
#define LDM_WINDOW_SIZE_LOG 28
|
||||||
|
|
||||||
// The minimum match length.
|
// The minimum match length.
|
||||||
@@ -47,6 +47,13 @@
|
|||||||
// Output the configuration.
|
// Output the configuration.
|
||||||
#define OUTPUT_CONFIGURATION
|
#define OUTPUT_CONFIGURATION
|
||||||
|
|
||||||
|
// If defined, forces the probability of insertion to be approximately
|
||||||
|
// one per (1 << HASH_ONLY_EVERY_LOG). If not defined, the probability will be
|
||||||
|
// calculated based on the memory usage and window size for "even" insertion
|
||||||
|
// throughout the window.
|
||||||
|
|
||||||
|
// #define HASH_ONLY_EVERY_LOG 8
|
||||||
|
|
||||||
// =============================================================================
|
// =============================================================================
|
||||||
|
|
||||||
// The number of bytes storing the compressed and decompressed size
|
// The number of bytes storing the compressed and decompressed size
|
||||||
|
|||||||
Reference in New Issue
Block a user