86 references to CompressionLevel
Microsoft.Arcade.Common (1)
ZipArchiveManager.cs (1)
25=> ZipFile.CreateFromDirectory(directoryPath, archivePath, CompressionLevel.Fastest, includeBaseDirectory);
Microsoft.AspNetCore.Components.Endpoints (1)
Builder\ResourceCollectionUrlEndpoint.cs (1)
85using var gzipStream = new GZipStream(gzipContent, CompressionLevel.Optimal, leaveOpen: true);
Microsoft.AspNetCore.Grpc.JsonTranscoding (3)
src\Grpc\JsonTranscoding\src\Shared\Server\MethodOptions.cs (3)
68public CompressionLevel? ResponseCompressionLevel { get; } 80CompressionLevel? responseCompressionLevel) 117CompressionLevel? responseCompressionLevel = null;
Microsoft.AspNetCore.ResponseCompression (5)
BrotliCompressionProviderOptions.cs (3)
15/// What level of compression to use for the stream. The default is <see cref="CompressionLevel.Fastest"/>. 17public CompressionLevel Level { get; set; } = CompressionLevel.Fastest;
GzipCompressionProviderOptions.cs (2)
17public CompressionLevel Level { get; set; } = CompressionLevel.Fastest;
Microsoft.AspNetCore.ResponseCompression.Tests (1)
ResponseCompressionMiddlewareTest.cs (1)
157services.Configure<GzipCompressionProviderOptions>(options => options.Level = CompressionLevel.NoCompression);
Microsoft.AspNetCore.StaticAssets (1)
Development\StaticAssetDevelopmentRuntimeHandler.cs (1)
107using var gzipStream = new GZipStream(stream, CompressionLevel.NoCompression, leaveOpen: true);
Microsoft.AspNetCore.StaticAssets.Tests (2)
StaticAssetsIntegrationTests.cs (2)
461using var gzipStream = new GZipStream(stream, CompressionLevel.NoCompression, leaveOpen: true); 546using var gzipStream = new GZipStream(fileStream, CompressionLevel.Fastest);
Microsoft.Build (1)
Logging\BinaryLogger\BinaryLogger.cs (1)
222stream = new GZipStream(stream, CompressionLevel.Optimal);
Microsoft.CodeAnalysis (4)
EmbeddedText.cs (4)
249using (var deflater = new CountingDeflateStream(builder, CompressionLevel.Optimal, leaveOpen: true)) 283using (var deflater = new CountingDeflateStream(builder, CompressionLevel.Optimal, leaveOpen: true)) 328using (var deflater = new CountingDeflateStream(builder, CompressionLevel.Optimal, leaveOpen: true)) 350public CountingDeflateStream(Stream stream, CompressionLevel compressionLevel, bool leaveOpen)
Microsoft.CodeAnalysis.Workspaces (1)
FindSymbols\Shared\AbstractSyntaxIndex_Persistence.cs (1)
166using (var gzipStream = new GZipStream(stream, CompressionLevel.Optimal, leaveOpen: true))
Microsoft.DotNet.Build.Tasks.Installers (3)
src\CreateChangelogFile.cs (1)
40using GZipStream stream = new(File.OpenWrite(ChangelogOutputPath), CompressionLevel.Optimal);
src\RpmBuilder.cs (1)
358using (GZipStream gzipStream = new(compressedPayload, CompressionLevel.Optimal, leaveOpen: true))
src\RpmPackage.cs (1)
49using GZipStream gzipStream = new(stream, CompressionLevel.Optimal, leaveOpen: true);
Microsoft.DotNet.SourceBuild.Tasks (1)
src\UsageReport\WritePackageUsageData.cs (1)
165.CreateEntry(relativePath, CompressionLevel.Optimal)
netstandard (1)
netstandard.cs (1)
891[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.IO.Compression.CompressionLevel))]
ResponseCompressionSample (1)
Startup.cs (1)
14services.Configure<GzipCompressionProviderOptions>(options => options.Level = CompressionLevel.Fastest);
System (1)
src\libraries\shims\System\ref\System.cs (1)
557[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.IO.Compression.CompressionLevel))]
System.IO.Compression (30)
System\IO\Compression\DeflateZLib\DeflateStream.cs (8)
40public DeflateStream(Stream stream, CompressionLevel compressionLevel) : this(stream, compressionLevel, leaveOpen: false) 45public DeflateStream(Stream stream, CompressionLevel compressionLevel, bool leaveOpen) : this(stream, compressionLevel, leaveOpen, ZLibNative.Deflate_DefaultWindowBits) 100internal DeflateStream(Stream stream, CompressionLevel compressionLevel, bool leaveOpen, int windowBits) 125private static ZLibNative.CompressionLevel GetZLibNativeCompressionLevel(CompressionLevel compressionLevel) => 128CompressionLevel.Optimal => ZLibNative.CompressionLevel.DefaultCompression, 129CompressionLevel.Fastest => ZLibNative.CompressionLevel.BestSpeed, 130CompressionLevel.NoCompression => ZLibNative.CompressionLevel.NoCompression, 131CompressionLevel.SmallestSize => ZLibNative.CompressionLevel.BestCompression,
System\IO\Compression\GZipStream.cs (2)
25public GZipStream(Stream stream, CompressionLevel compressionLevel) : this(stream, compressionLevel, leaveOpen: false) 30public GZipStream(Stream stream, CompressionLevel compressionLevel, bool leaveOpen)
System\IO\Compression\ZipArchive.cs (2)
288public ZipArchiveEntry CreateEntry(string entryName, CompressionLevel compressionLevel) 392private ZipArchiveEntry DoCreateEntry(string entryName, CompressionLevel? compressionLevel)
System\IO\Compression\ZipArchiveEntry.cs (16)
47private readonly CompressionLevel _compressionLevel; 93internal ZipArchiveEntry(ZipArchive archive, string entryName, CompressionLevel compressionLevel) 97if (_compressionLevel == CompressionLevel.NoCompression) 115_compressionLevel = CompressionLevel.Optimal; 814private static CompressionLevel MapCompressionLevel(BitFlagValues generalPurposeBitFlag, CompressionMethodValues compressionMethod) 8220 => CompressionLevel.Optimal, 8232 => CompressionLevel.SmallestSize, 8244 => CompressionLevel.Fastest, 8256 => CompressionLevel.Fastest, 826_ => CompressionLevel.Optimal 831return CompressionLevel.NoCompression; 835private static BitFlagValues MapDeflateCompressionOption(BitFlagValues generalPurposeBitFlag, CompressionLevel compressionLevel, CompressionMethodValues compressionMethod) 843CompressionLevel.Optimal => 0, 844CompressionLevel.SmallestSize => 2, 845CompressionLevel.Fastest => 6, 846CompressionLevel.NoCompression => 6,
System\IO\Compression\ZLibStream.cs (2)
35public ZLibStream(Stream stream, CompressionLevel compressionLevel) : this(stream, compressionLevel, leaveOpen: false) 43public ZLibStream(Stream stream, CompressionLevel compressionLevel, bool leaveOpen)
System.IO.Compression.Brotli (7)
System\IO\Compression\BrotliUtils.cs (5)
15internal static int GetQualityFromCompressionLevel(CompressionLevel compressionLevel) => 18CompressionLevel.NoCompression => Quality_Min, 19CompressionLevel.Fastest => 1, 20CompressionLevel.Optimal => Quality_Default, 21CompressionLevel.SmallestSize => Quality_Max,
System\IO\Compression\enc\BrotliStream.Compress.cs (2)
20public BrotliStream(Stream stream, CompressionLevel compressionLevel) : this(stream, compressionLevel, leaveOpen: false) { } 27public BrotliStream(Stream stream, CompressionLevel compressionLevel, bool leaveOpen) : this(stream, CompressionMode.Compress, leaveOpen)
System.IO.Compression.ZipFile (12)
System\IO\Compression\ZipFile.Create.cs (10)
279public static void CreateFromDirectory(string sourceDirectoryName, string destinationArchiveFileName, CompressionLevel compressionLevel, bool includeBaseDirectory) => 349CompressionLevel compressionLevel, bool includeBaseDirectory, Encoding? entryNameEncoding) => 360/// If you want to include the base directory or specify a compression level, call the <see cref="CreateFromDirectory(string, Stream, CompressionLevel, bool)"/> method overload. 400/// <exception cref="ArgumentOutOfRangeException"><paramref name="compressionLevel"/> is not a valid <see cref="CompressionLevel"/> value.</exception> 401public static void CreateFromDirectory(string sourceDirectoryName, Stream destination, CompressionLevel compressionLevel, bool includeBaseDirectory) => 428/// <exception cref="ArgumentOutOfRangeException"><paramref name="compressionLevel"/> is not a valid <see cref="CompressionLevel"/> value.</exception> 430CompressionLevel compressionLevel, bool includeBaseDirectory, Encoding? entryNameEncoding) => 434CompressionLevel? compressionLevel, bool includeBaseDirectory, Encoding? entryNameEncoding) 450CompressionLevel? compressionLevel, bool includeBaseDirectory, Encoding? entryNameEncoding) 471CompressionLevel? compressionLevel, bool includeBaseDirectory)
System\IO\Compression\ZipFileExtensions.ZipArchive.Create.cs (2)
77string sourceFileName, string entryName, CompressionLevel compressionLevel) => 81string sourceFileName, string entryName, CompressionLevel? compressionLevel)
System.IO.Packaging (9)
System\IO\Packaging\ZipPackage.cs (9)
49CompressionLevel level; 442out CompressionLevel compressionLevel) 448compressionLevel = CompressionLevel.NoCompression; 453compressionLevel = CompressionLevel.Optimal; 459compressionLevel = CompressionLevel.SmallestSize; 467compressionLevel = CompressionLevel.Fastest; 472compressionLevel = CompressionLevel.Fastest; 812CompressionLevel compressionLevel) 1304private CompressionLevel _cachedCompressionLevel;
System.Reflection.Metadata (1)
System\Reflection\PortableExecutable\DebugDirectory\DebugDirectoryBuilder.EmbeddedPortablePdb.cs (1)
51using (var deflate = new DeflateStream(compressed, CompressionLevel.Optimal, leaveOpen: true))