Closed minimalisticMe closed 6 months ago
Hi,
you can use compressor.SetParameter(ZSTD_cParameter.ZSTD_c_enableLongDistanceMatching, 1);
That works, thank you very much, is this enabling long distance matching or is it also possible to set a windows log?
Reference: https://github.com/facebook/zstd/tree/dev/programs
--long[=#]: enable long distance matching with given window log (default: 27)
You can use parameters from here: https://facebook.github.io/zstd/zstd_manual.html#Chapter5
ZSTD_c_enableLongDistanceMatching
, ZSTD_c_windowLog
etc
ZSTD_c_enableLongDistanceMatching=160, / Enable long distance matching. This parameter is designed to improve compression ratio for large inputs, by finding large matches at long distance. It increases memory usage and window size. Note: enabling this parameter increases default ZSTD_c_windowLog to 128 MB except when expressly set to a different value. Note: will be enabled by default if ZSTD_c_windowLog >= 128 MB and compression strategy >= ZSTD_btopt (== compression level 16+) /
Thank you very much!
Hi,
is it possible to configure usage of long distance matching for compression? I could find it in file https://github.com/oleg-st/ZstdSharp/blob/7dfb8b45862d4eac067a5d6f99b09a23ed521e90/src/ZstdSharp/Unsafe/ZstdLdm.cs#L195 but I don't see how I can configure it. Is there something I am missing out or is it currently not possible to configure for long distance matching?