| | | 1 | | // Licensed to the .NET Foundation under one or more agreements. |
| | | 2 | | // The .NET Foundation licenses this file to you under the MIT license. |
| | | 3 | | |
| | | 4 | | namespace System.IO.Compression |
| | | 5 | | { |
| | | 6 | | /// <summary>Provides decompression options to be used with Zstandard decompression.</summary> |
| | | 7 | | [System.Runtime.Versioning.UnsupportedOSPlatform("browser")] |
| | | 8 | | [System.Runtime.Versioning.UnsupportedOSPlatform("wasi")] |
| | | 9 | | public sealed class ZstandardDecompressionOptions |
| | | 10 | | { |
| | | 11 | | |
| | | 12 | | /// <summary>Gets or sets the maximum allowed base-2 logarithm of the window size when decompressing payloads.</ |
| | | 13 | | /// <value>The maximum allowed base-2 logarithm of the window size for decompression.</value> |
| | | 14 | | /// <remarks> |
| | | 15 | | /// The valid range is from <see cref="ZstandardCompressionOptions.MinWindowLog2"/> to <see cref="ZstandardCompr |
| | | 16 | | /// Value 0 indicates the implementation-defined default window size. |
| | | 17 | | /// </remarks> |
| | | 18 | | /// <exception cref="ArgumentOutOfRangeException">The value is not 0 and is not between <see cref="ZstandardComp |
| | | 19 | | public int MaxWindowLog2 |
| | | 20 | | { |
| | 0 | 21 | | get; |
| | | 22 | | set |
| | 0 | 23 | | { |
| | 0 | 24 | | if (value != 0) |
| | 0 | 25 | | { |
| | 0 | 26 | | ArgumentOutOfRangeException.ThrowIfLessThan(value, ZstandardUtils.WindowLog_Min, nameof(value)); |
| | 0 | 27 | | ArgumentOutOfRangeException.ThrowIfGreaterThan(value, ZstandardUtils.WindowLog_Max, nameof(value)); |
| | 0 | 28 | | } |
| | | 29 | | |
| | 0 | 30 | | field = value; |
| | 0 | 31 | | } |
| | | 32 | | } |
| | | 33 | | |
| | | 34 | | /// <summary>Gets or sets the dictionary to use for decompression.</summary> |
| | | 35 | | /// <value>The decompression dictionary, or <see langword="null"/> if no dictionary is used.</value> |
| | 0 | 36 | | public ZstandardDictionary? Dictionary { get; set; } |
| | | 37 | | } |
| | | 38 | | } |