42 references to ZstandardUtils
System.IO.Compression (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\Zstandard\ZstandardCompressionOptions.cs (12)
12public static int DefaultQuality => ZstandardUtils.Quality_Default; 15public static int MinQuality => ZstandardUtils.Quality_Min; 18public static int MaxQuality => ZstandardUtils.Quality_Max; 21public static int DefaultWindowLog => ZstandardUtils.WindowLog_Default; 24public static int MinWindowLog => ZstandardUtils.WindowLog_Min; 27public static int MaxWindowLog => ZstandardUtils.WindowLog_Max; 51ArgumentOutOfRangeException.ThrowIfGreaterThan(value, ZstandardUtils.Quality_Max, nameof(value)); 52ArgumentOutOfRangeException.ThrowIfLessThan(value, ZstandardUtils.Quality_Min, nameof(value)); 75ArgumentOutOfRangeException.ThrowIfLessThan(value, ZstandardUtils.WindowLog_Min, nameof(value)); 76ArgumentOutOfRangeException.ThrowIfGreaterThan(value, ZstandardUtils.WindowLog_Max, nameof(value)); 96ArgumentOutOfRangeException.ThrowIfLessThan(value, ZstandardUtils.TargetBlockSize_Min, nameof(value)); 97ArgumentOutOfRangeException.ThrowIfGreaterThan(value, ZstandardUtils.TargetBlockSize_Max, nameof(value));
System\IO\Compression\Zstandard\ZstandardDecoder.cs (9)
167if (ZstandardUtils.IsError(result, out var error)) 175ZstandardUtils.Throw(error); 259if (ZstandardUtils.IsError(result, out var error)) 304if (ZstandardUtils.IsError(result, out var error)) 341if (ZstandardUtils.IsError(result, out var error)) 343ZstandardUtils.Throw(error); 365ArgumentOutOfRangeException.ThrowIfLessThan(maxWindowLog, ZstandardUtils.WindowLog_Min, nameof(maxWindowLog)); 366ArgumentOutOfRangeException.ThrowIfGreaterThan(maxWindowLog, ZstandardUtils.WindowLog_Max, nameof(maxWindowLog)); 370ZstandardUtils.ThrowIfError(result);
System\IO\Compression\Zstandard\ZstandardDictionary.cs (2)
33public static ZstandardDictionary Create(ReadOnlySpan<byte> buffer) => Create(buffer, ZstandardUtils.Quality_Default); 145ZstandardUtils.ThrowIfError(dictSize);
System\IO\Compression\Zstandard\ZstandardEncoder.cs (14)
259if (ZstandardUtils.IsError(result, out var error)) 266ZstandardUtils.Throw(error); 296if (ZstandardUtils.IsError(result)) 316return TryCompress(source, destination, out bytesWritten, ZstandardUtils.Quality_Default, 0); 378if (ZstandardUtils.IsError(result, out var error)) 415if (ZstandardUtils.IsError(result, out var error)) 417ZstandardUtils.Throw(error); 441if (ZstandardUtils.IsError(Interop.Zstd.ZSTD_CCtx_setPledgedSrcSize(_context, (ulong)length), out var error)) 443ZstandardUtils.Throw(error); 463ArgumentOutOfRangeException.ThrowIfLessThan(quality, ZstandardUtils.Quality_Min, nameof(quality)); 464ArgumentOutOfRangeException.ThrowIfGreaterThan(quality, ZstandardUtils.Quality_Max, nameof(quality)); 474ArgumentOutOfRangeException.ThrowIfLessThan(windowLog, ZstandardUtils.WindowLog_Min, nameof(windowLog)); 475ArgumentOutOfRangeException.ThrowIfGreaterThan(windowLog, ZstandardUtils.WindowLog_Max, nameof(windowLog)); 494ZstandardUtils.ThrowIfError(result);
System\IO\Compression\Zstandard\ZstandardStream.Compress.cs (1)
36_encoder = new ZstandardEncoder(ZstandardUtils.GetQualityFromCompressionLevel(compressionLevel));