public Compressor(byte[] dict = null, int compressionLevel = DefaultCompressionLevel) { CompressionLevel = compressionLevel; Dictionary = dict; cctx = ExternMethods.ZSTD_createCCtx().EnsureZstdSuccess(); if (dict != null) { cdict = ExternMethods.ZSTD_createCDict(dict, (size_t)dict.Length, compressionLevel).EnsureZstdSuccess(); } }
public Compressor(CompressionOptions options) { Options = options; cctx = ExternMethods.ZSTD_createCCtx().EnsureZstdSuccess(); options.ApplyCompressionParams(cctx); if (options.Cdict != IntPtr.Zero) { ExternMethods.ZSTD_CCtx_refCDict(cctx, options.Cdict).EnsureZstdSuccess(); } }
public Compressor(CompressionOptions options) { Options = options; cctx = ExternMethods.ZSTD_createCCtx().EnsureZstdSuccess(); }