oleg-st / ZstdSharp

Port of zstd compression library to c#
MIT License
200 stars 29 forks source link

Add option to customize compression level when training dictionary - fixes #22 #23

Closed pkese closed 1 year ago

oleg-st commented 1 year ago

The ZDICT_trainFromBuffer is part of the unsafe public API of the ZstdSharp library, which is the same as that of the zstd library. It is not supposed to change this method. https://github.com/facebook/zstd/blob/ba12054273bd022c52d2f0c9d87c02d9454e029c/lib/dictBuilder/zdict.c#L1101

We can add custom safe wrapper for ZDICT_optimizeTrainFromBuffer_fastCover in DictBuilder class.

pkese commented 1 year ago

Ok, sure.

I'll close this pull request (presumably we don't want to deviate from standard ZSTD's APIs with regards to ZDICT_trainFromBuffer),
but I keep the ticket itself open as a feature request.