Closed pkese closed 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
ZDICT_trainFromBuffer
ZstdSharp
zstd
We can add custom safe wrapper for ZDICT_optimizeTrainFromBuffer_fastCover in DictBuilder class.
ZDICT_optimizeTrainFromBuffer_fastCover
DictBuilder
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.
The
ZDICT_trainFromBuffer
is part of the unsafe public API of theZstdSharp
library, which is the same as that of thezstd
library. It is not supposed to change this method. https://github.com/facebook/zstd/blob/ba12054273bd022c52d2f0c9d87c02d9454e029c/lib/dictBuilder/zdict.c#L1101We can add custom safe wrapper for
ZDICT_optimizeTrainFromBuffer_fastCover
inDictBuilder
class.