mirror of
https://github.com/emmanuel-marty/lzsa.git
synced 2025-02-19 06:31:27 +00:00
Use -m3 as an upper bound for LZSA2
This commit is contained in:
parent
028163c42a
commit
71f262081b
BIN
pareto_graph.png
Normal file
BIN
pareto_graph.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 34 KiB |
@ -51,6 +51,7 @@
|
|||||||
int lzsa_compressor_init(lzsa_compressor *pCompressor, const int nMaxWindowSize, const int nMinMatchSize, const int nFormatVersion, const int nFlags) {
|
int lzsa_compressor_init(lzsa_compressor *pCompressor, const int nMaxWindowSize, const int nMinMatchSize, const int nFormatVersion, const int nFlags) {
|
||||||
int nResult;
|
int nResult;
|
||||||
int nMinMatchSizeForFormat = (nFormatVersion == 1) ? MIN_MATCH_SIZE_V1 : MIN_MATCH_SIZE_V2;
|
int nMinMatchSizeForFormat = (nFormatVersion == 1) ? MIN_MATCH_SIZE_V1 : MIN_MATCH_SIZE_V2;
|
||||||
|
int nMaxMinMatchForFormat = (nFormatVersion == 1) ? 5 : 3;
|
||||||
|
|
||||||
nResult = divsufsort_init(&pCompressor->divsufsort_context);
|
nResult = divsufsort_init(&pCompressor->divsufsort_context);
|
||||||
pCompressor->intervals = NULL;
|
pCompressor->intervals = NULL;
|
||||||
@ -63,8 +64,8 @@ int lzsa_compressor_init(lzsa_compressor *pCompressor, const int nMaxWindowSize,
|
|||||||
pCompressor->min_match_size = nMinMatchSize;
|
pCompressor->min_match_size = nMinMatchSize;
|
||||||
if (pCompressor->min_match_size < nMinMatchSizeForFormat)
|
if (pCompressor->min_match_size < nMinMatchSizeForFormat)
|
||||||
pCompressor->min_match_size = nMinMatchSizeForFormat;
|
pCompressor->min_match_size = nMinMatchSizeForFormat;
|
||||||
else if (pCompressor->min_match_size > 5)
|
else if (pCompressor->min_match_size > nMaxMinMatchForFormat)
|
||||||
pCompressor->min_match_size = 5;
|
pCompressor->min_match_size = nMaxMinMatchForFormat;
|
||||||
pCompressor->format_version = nFormatVersion;
|
pCompressor->format_version = nFormatVersion;
|
||||||
pCompressor->flags = nFlags;
|
pCompressor->flags = nFlags;
|
||||||
pCompressor->num_commands = 0;
|
pCompressor->num_commands = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user