42 references to ZstandardUtils
System.IO.Compression.Zstandard (42)
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeZstdHandle.cs (4)
42
ZstandardUtils
.ThrowIfError(Interop.Zstd.ZSTD_CCtx_refCDict(this, dictionary));
74
ZstandardUtils
.ThrowIfError(Interop.Zstd.ZSTD_CCtx_reset(this, Interop.Zstd.ZstdResetDirective.ZSTD_reset_session_only));
117
ZstandardUtils
.ThrowIfError(Interop.Zstd.ZSTD_DCtx_refDDict(this, dictionary));
149
ZstandardUtils
.ThrowIfError(Interop.Zstd.ZSTD_DCtx_reset(this, Interop.Zstd.ZstdResetDirective.ZSTD_reset_session_only));
System\IO\Compression\ZstandardCompressionOptions.cs (12)
10
public static int DefaultQuality =>
ZstandardUtils
.Quality_Default;
13
public static int MinQuality =>
ZstandardUtils
.Quality_Min;
16
public static int MaxQuality =>
ZstandardUtils
.Quality_Max;
19
public static int DefaultWindowLog =>
ZstandardUtils
.WindowLog_Default;
22
public static int MinWindowLog =>
ZstandardUtils
.WindowLog_Min;
25
public static int MaxWindowLog =>
ZstandardUtils
.WindowLog_Max;
49
ArgumentOutOfRangeException.ThrowIfGreaterThan(value,
ZstandardUtils
.Quality_Max, nameof(value));
50
ArgumentOutOfRangeException.ThrowIfLessThan(value,
ZstandardUtils
.Quality_Min, nameof(value));
73
ArgumentOutOfRangeException.ThrowIfLessThan(value,
ZstandardUtils
.WindowLog_Min, nameof(value));
74
ArgumentOutOfRangeException.ThrowIfGreaterThan(value,
ZstandardUtils
.WindowLog_Max, nameof(value));
94
ArgumentOutOfRangeException.ThrowIfLessThan(value,
ZstandardUtils
.TargetBlockSize_Min, nameof(value));
95
ArgumentOutOfRangeException.ThrowIfGreaterThan(value,
ZstandardUtils
.TargetBlockSize_Max, nameof(value));
System\IO\Compression\ZstandardDecoder.cs (9)
165
if (
ZstandardUtils
.IsError(result, out var error))
173
ZstandardUtils
.Throw(error);
257
if (
ZstandardUtils
.IsError(result, out var error))
302
if (
ZstandardUtils
.IsError(result, out var error))
339
if (
ZstandardUtils
.IsError(result, out var error))
341
ZstandardUtils
.Throw(error);
363
ArgumentOutOfRangeException.ThrowIfLessThan(maxWindowLog,
ZstandardUtils
.WindowLog_Min, nameof(maxWindowLog));
364
ArgumentOutOfRangeException.ThrowIfGreaterThan(maxWindowLog,
ZstandardUtils
.WindowLog_Max, nameof(maxWindowLog));
368
ZstandardUtils
.ThrowIfError(result);
System\IO\Compression\ZstandardDictionary.cs (2)
31
public static ZstandardDictionary Create(ReadOnlySpan<byte> buffer) => Create(buffer,
ZstandardUtils
.Quality_Default);
143
ZstandardUtils
.ThrowIfError(dictSize);
System\IO\Compression\ZstandardEncoder.cs (14)
257
if (
ZstandardUtils
.IsError(result, out var error))
264
ZstandardUtils
.Throw(error);
294
if (
ZstandardUtils
.IsError(result))
314
return TryCompress(source, destination, out bytesWritten,
ZstandardUtils
.Quality_Default, 0);
376
if (
ZstandardUtils
.IsError(result, out var error))
413
if (
ZstandardUtils
.IsError(result, out var error))
415
ZstandardUtils
.Throw(error);
439
if (
ZstandardUtils
.IsError(Interop.Zstd.ZSTD_CCtx_setPledgedSrcSize(_context, (ulong)length), out var error))
441
ZstandardUtils
.Throw(error);
461
ArgumentOutOfRangeException.ThrowIfLessThan(quality,
ZstandardUtils
.Quality_Min, nameof(quality));
462
ArgumentOutOfRangeException.ThrowIfGreaterThan(quality,
ZstandardUtils
.Quality_Max, nameof(quality));
472
ArgumentOutOfRangeException.ThrowIfLessThan(windowLog,
ZstandardUtils
.WindowLog_Min, nameof(windowLog));
473
ArgumentOutOfRangeException.ThrowIfGreaterThan(windowLog,
ZstandardUtils
.WindowLog_Max, nameof(windowLog));
492
ZstandardUtils
.ThrowIfError(result);
System\IO\Compression\ZstandardStream.Compress.cs (1)
36
_encoder = new ZstandardEncoder(
ZstandardUtils
.GetQualityFromCompressionLevel(compressionLevel));