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