diff --git a/src/libraries/NetCoreAppLibrary.props b/src/libraries/NetCoreAppLibrary.props index eadeda33e7de6b..2a03638b2cfd9f 100644 --- a/src/libraries/NetCoreAppLibrary.props +++ b/src/libraries/NetCoreAppLibrary.props @@ -68,7 +68,6 @@ System.IO.Compression; System.IO.Compression.Brotli; System.IO.Compression.ZipFile; - System.IO.Compression.Zstandard; System.IO.FileSystem; System.IO.FileSystem.AccessControl; System.IO.FileSystem.DriveInfo; diff --git a/src/libraries/System.IO.Compression.Zstandard/Directory.Build.props b/src/libraries/System.IO.Compression.Zstandard/Directory.Build.props deleted file mode 100644 index 9762662391d8d8..00000000000000 --- a/src/libraries/System.IO.Compression.Zstandard/Directory.Build.props +++ /dev/null @@ -1,7 +0,0 @@ - - - - true - browser;wasi - - diff --git a/src/libraries/System.IO.Compression.Zstandard/README.md b/src/libraries/System.IO.Compression.Zstandard/README.md deleted file mode 100644 index ba1b3a6fd69f1a..00000000000000 --- a/src/libraries/System.IO.Compression.Zstandard/README.md +++ /dev/null @@ -1,37 +0,0 @@ -# System.IO.Compression.Zstandard -This library provides support for Zstandard compression and decompression operations in .NET. Zstandard (zstd) is a fast compression algorithm that provides high compression ratios and is particularly effective for real-time compression scenarios. - -## Contribution Bar -- [x] [We consider new features, new APIs and performance changes](../../libraries/README.md#primary-bar) -- [x] [We consider PRs that target this library for new source code analyzers](../../libraries/README.md#secondary-bars) - -See the [Help Wanted](https://github.com/dotnet/runtime/issues?q=is%3Aopen+is%3Aissue+label%3Aarea-System.IO.Compression+label%3A%22help+wanted%22) issues. We don't have a specific label for Zstandard issues so you will need to read through the list and see if something is available. - -## Usage - -```csharp -// Compression -using var input = new FileStream("input.txt", FileMode.Open); -using var output = new FileStream("compressed.zst", FileMode.Create); -using var zstdStream = new ZstandardStream(output, CompressionMode.Compress); -input.CopyTo(zstdStream); - -// Decompression -using var compressed = new FileStream("compressed.zst", FileMode.Open); -using var decompressed = new FileStream("output.txt", FileMode.Create); -using var zstdStream = new ZstandardStream(compressed, CompressionMode.Decompress); -zstdStream.CopyTo(decompressed); - -// Using custom options -var options = new ZstandardCompressionOptions { Quality = 9 }; -using var zstdStream = new ZstandardStream(output, options); -``` - -## Platform Support -This library is supported on all platforms supported by .NET except for browser and WASI. - -## Deployment -`System.IO.Compression.Zstandard` is included in the shared framework since .NET 11.0. - -## See also - - [`System.IO.Compression`](../System.IO.Compression#readme) diff --git a/src/libraries/System.IO.Compression.Zstandard/System.IO.Compression.Zstandard.slnx b/src/libraries/System.IO.Compression.Zstandard/System.IO.Compression.Zstandard.slnx deleted file mode 100644 index dd4563aa327bf3..00000000000000 --- a/src/libraries/System.IO.Compression.Zstandard/System.IO.Compression.Zstandard.slnx +++ /dev/null @@ -1,298 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/libraries/System.IO.Compression.Zstandard/ref/System.IO.Compression.Zstandard.cs b/src/libraries/System.IO.Compression.Zstandard/ref/System.IO.Compression.Zstandard.cs deleted file mode 100644 index 01ccb7eda45bbf..00000000000000 --- a/src/libraries/System.IO.Compression.Zstandard/ref/System.IO.Compression.Zstandard.cs +++ /dev/null @@ -1,105 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// ------------------------------------------------------------------------------ -// Changes to this file must follow the https://aka.ms/api-review process. -// ------------------------------------------------------------------------------ - -namespace System.IO.Compression -{ - public sealed partial class ZstandardCompressionOptions - { - public ZstandardCompressionOptions() { } - public bool AppendChecksum { get { throw null; } set { } } - public static int DefaultQuality { get { throw null; } } - public static int DefaultWindowLog { get { throw null; } } - public System.IO.Compression.ZstandardDictionary? Dictionary { get { throw null; } set { } } - public bool EnableLongDistanceMatching { get { throw null; } set { } } - public static int MaxQuality { get { throw null; } } - public static int MaxWindowLog { get { throw null; } } - public static int MinQuality { get { throw null; } } - public static int MinWindowLog { get { throw null; } } - public int Quality { get { throw null; } set { } } - public int TargetBlockSize { get { throw null; } set { } } - public int WindowLog { get { throw null; } set { } } - } - public sealed partial class ZstandardDecoder : System.IDisposable - { - public ZstandardDecoder() { } - public ZstandardDecoder(int maxWindowLog) { } - public ZstandardDecoder(System.IO.Compression.ZstandardDictionary dictionary) { } - public ZstandardDecoder(System.IO.Compression.ZstandardDictionary dictionary, int maxWindowLog) { } - public System.Buffers.OperationStatus Decompress(System.ReadOnlySpan source, System.Span destination, out int bytesConsumed, out int bytesWritten) { throw null; } - public void Dispose() { } - public void Reset() { } - public void SetPrefix(System.ReadOnlyMemory prefix) { } - public static bool TryDecompress(System.ReadOnlySpan source, System.Span destination, out int bytesWritten) { throw null; } - public static bool TryDecompress(System.ReadOnlySpan source, System.Span destination, out int bytesWritten, System.IO.Compression.ZstandardDictionary dictionary) { throw null; } - public static bool TryGetMaxDecompressedLength(System.ReadOnlySpan data, out long length) { throw null; } - } - public sealed partial class ZstandardDictionary : System.IDisposable - { - internal ZstandardDictionary() { } - public System.ReadOnlyMemory Data { get { throw null; } } - public static System.IO.Compression.ZstandardDictionary Create(System.ReadOnlySpan buffer) { throw null; } - public static System.IO.Compression.ZstandardDictionary Create(System.ReadOnlySpan buffer, int quality) { throw null; } - public void Dispose() { } - public static System.IO.Compression.ZstandardDictionary Train(System.ReadOnlySpan samples, System.ReadOnlySpan sampleLengths, int maxDictionarySize) { throw null; } - } - public sealed partial class ZstandardEncoder : System.IDisposable - { - public ZstandardEncoder() { } - public ZstandardEncoder(int quality) { } - public ZstandardEncoder(int quality, int windowLog) { } - public ZstandardEncoder(System.IO.Compression.ZstandardCompressionOptions compressionOptions) { } - public ZstandardEncoder(System.IO.Compression.ZstandardDictionary dictionary) { } - public ZstandardEncoder(System.IO.Compression.ZstandardDictionary dictionary, int windowLog) { } - public System.Buffers.OperationStatus Compress(System.ReadOnlySpan source, System.Span destination, out int bytesConsumed, out int bytesWritten, bool isFinalBlock) { throw null; } - public void Dispose() { } - public System.Buffers.OperationStatus Flush(System.Span destination, out int bytesWritten) { throw null; } - public static long GetMaxCompressedLength(long inputLength) { throw null; } - public void Reset() { } - public void SetPrefix(System.ReadOnlyMemory prefix) { } - public void SetSourceLength(long length) { } - public static bool TryCompress(System.ReadOnlySpan source, System.Span destination, out int bytesWritten) { throw null; } - public static bool TryCompress(System.ReadOnlySpan source, System.Span destination, out int bytesWritten, int quality, int windowLog) { throw null; } - public static bool TryCompress(System.ReadOnlySpan source, System.Span destination, out int bytesWritten, System.IO.Compression.ZstandardDictionary dictionary, int windowLog) { throw null; } - } - public sealed partial class ZstandardStream : System.IO.Stream - { - public ZstandardStream(System.IO.Stream stream, System.IO.Compression.CompressionLevel compressionLevel) { } - public ZstandardStream(System.IO.Stream stream, System.IO.Compression.CompressionLevel compressionLevel, bool leaveOpen) { } - public ZstandardStream(System.IO.Stream stream, System.IO.Compression.CompressionMode mode) { } - public ZstandardStream(System.IO.Stream stream, System.IO.Compression.CompressionMode mode, bool leaveOpen) { } - public ZstandardStream(System.IO.Stream stream, System.IO.Compression.CompressionMode mode, System.IO.Compression.ZstandardDictionary dictionary, bool leaveOpen = false) { } - public ZstandardStream(System.IO.Stream stream, System.IO.Compression.ZstandardCompressionOptions compressionOptions, bool leaveOpen = false) { } - public ZstandardStream(System.IO.Stream stream, System.IO.Compression.ZstandardDecoder decoder, bool leaveOpen = false) { } - public ZstandardStream(System.IO.Stream stream, System.IO.Compression.ZstandardEncoder encoder, bool leaveOpen = false) { } - public System.IO.Stream BaseStream { get { throw null; } } - public override bool CanRead { get { throw null; } } - public override bool CanSeek { get { throw null; } } - public override bool CanWrite { get { throw null; } } - public override long Length { get { throw null; } } - public override long Position { get { throw null; } set { } } - public override System.IAsyncResult BeginRead(byte[] buffer, int offset, int count, System.AsyncCallback? callback, object? state) { throw null; } - public override System.IAsyncResult BeginWrite(byte[] buffer, int offset, int count, System.AsyncCallback? callback, object? state) { throw null; } - protected override void Dispose(bool disposing) { } - public override System.Threading.Tasks.ValueTask DisposeAsync() { throw null; } - public override int EndRead(System.IAsyncResult asyncResult) { throw null; } - public override void EndWrite(System.IAsyncResult asyncResult) { } - public override void Flush() { } - public override System.Threading.Tasks.Task FlushAsync(System.Threading.CancellationToken cancellationToken) { throw null; } - public override int Read(byte[] buffer, int offset, int count) { throw null; } - public override int Read(System.Span buffer) { throw null; } - public override System.Threading.Tasks.Task ReadAsync(byte[] buffer, int offset, int count, System.Threading.CancellationToken cancellationToken) { throw null; } - public override System.Threading.Tasks.ValueTask ReadAsync(System.Memory buffer, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public override int ReadByte() { throw null; } - public override long Seek(long offset, System.IO.SeekOrigin origin) { throw null; } - public override void SetLength(long value) { } - public void SetSourceLength(long length) { } - public override void Write(byte[] buffer, int offset, int count) { } - public override void Write(System.ReadOnlySpan buffer) { } - public override System.Threading.Tasks.Task WriteAsync(byte[] buffer, int offset, int count, System.Threading.CancellationToken cancellationToken) { throw null; } - public override System.Threading.Tasks.ValueTask WriteAsync(System.ReadOnlyMemory buffer, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public override void WriteByte(byte value) { } - } -} diff --git a/src/libraries/System.IO.Compression.Zstandard/ref/System.IO.Compression.Zstandard.csproj b/src/libraries/System.IO.Compression.Zstandard/ref/System.IO.Compression.Zstandard.csproj deleted file mode 100644 index 8f57e03facb1fe..00000000000000 --- a/src/libraries/System.IO.Compression.Zstandard/ref/System.IO.Compression.Zstandard.csproj +++ /dev/null @@ -1,14 +0,0 @@ - - - $(NetCoreAppCurrent) - - - - - - - - - - - diff --git a/src/libraries/System.IO.Compression.Zstandard/src/Resources/Strings.resx b/src/libraries/System.IO.Compression.Zstandard/src/Resources/Strings.resx deleted file mode 100644 index c814104284f0ed..00000000000000 --- a/src/libraries/System.IO.Compression.Zstandard/src/Resources/Strings.resx +++ /dev/null @@ -1,81 +0,0 @@ - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - The compression level must be between {0} and {1}. - - - Enum value was out of legal range. - - - Cannot read from a stream that was opened for compression. - - - Cannot write to a stream that was opened for decompression. - - - System.IO.Compression.Zstandard is not supported on this platform. - - - The base stream is not readable. - - - The base stream is not writable. - - - The requested operation is not valid once compression or decompression has begun. - - - Found truncated data while decoding. - - - Data requires too much memory for decoding. Consider increasing the 'maxWindowLog' parameter. - - - The provided dictionary is not valid for decoding the current data. - - - Decoder encountered invalid data. - - - ZstandardStream.BaseStream returned more bytes than requested in Read. - - - Encoder encountered invalid data. - - - Only one pending read/write operation is supported. - - - Buffer cannot be empty. - - - Failed to create Zstandard compression dictionary. - - - Failed to create Zstandard decompression dictionary. - - - The sum of sample lengths does not match the length of the samples buffer. - - - At least {0} samples are required to train the dictionary. - - - Sample lengths must be positive values. - - - An internal error has occurred: {0}. - - diff --git a/src/libraries/System.IO.Compression.Zstandard/src/System.IO.Compression.Zstandard.csproj b/src/libraries/System.IO.Compression.Zstandard/src/System.IO.Compression.Zstandard.csproj deleted file mode 100644 index 1589b84fce930b..00000000000000 --- a/src/libraries/System.IO.Compression.Zstandard/src/System.IO.Compression.Zstandard.csproj +++ /dev/null @@ -1,55 +0,0 @@ - - - - $(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-unix;$(NetCoreAppCurrent) - true - - true - - - - - $([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) - - SR.IOCompressionZstandard_PlatformNotSupported - - - $(NoWarn);CS1591 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/libraries/System.IO.Compression.Zstandard/tests/System.IO.Compression.Zstandard.Tests.csproj b/src/libraries/System.IO.Compression.Zstandard/tests/System.IO.Compression.Zstandard.Tests.csproj deleted file mode 100644 index 4bb6138c023b18..00000000000000 --- a/src/libraries/System.IO.Compression.Zstandard/tests/System.IO.Compression.Zstandard.Tests.csproj +++ /dev/null @@ -1,34 +0,0 @@ - - - $(NetCoreAppCurrent) - true - true - true - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/libraries/System.IO.Compression/Directory.Build.props b/src/libraries/System.IO.Compression/Directory.Build.props index 8cda5782c1d130..6c1fc485f66600 100644 --- a/src/libraries/System.IO.Compression/Directory.Build.props +++ b/src/libraries/System.IO.Compression/Directory.Build.props @@ -1,4 +1,4 @@ - + ECMA diff --git a/src/libraries/System.IO.Compression/README.md b/src/libraries/System.IO.Compression/README.md index 5e13967d69c511..089394ceb637e6 100644 --- a/src/libraries/System.IO.Compression/README.md +++ b/src/libraries/System.IO.Compression/README.md @@ -1,11 +1,14 @@ # System.IO.Compression -Contains the source and tests of assembly System.IO.Compression, that includes types widely used on the compression space, as well as types for zip manipulation, and implementations of the Deflate and Gzip algorithms. +Contains the source and tests of assembly System.IO.Compression, that includes types widely used on the compression space, as well as types for zip manipulation, and implementations of the Deflate, Gzip, and Zstandard algorithms. Documentation can be found at https://learn.microsoft.com/dotnet/api/system.io.compression. ## System.IO.Compression.Native source [../../native/libs/System.IO.Compression.Native](../../native/libs/System.IO.Compression.Native) contains the PAL (Platform Abstraction Layer) of the zlib library used by System.IO.Compression. +## Zstandard support +Zstandard (zstd) compression and decompression is supported on all platforms except browser and WASI. The Zstandard source files are located in the `Zstandard` subdirectory. + ## Contribution Bar - [x] [We consider new features, new APIs and performance changes](../../libraries/README.md#primary-bar) - [x] [We consider PRs that target this library for new source code analyzers](../../libraries/README.md#secondary-bars) @@ -18,4 +21,3 @@ See the [Help Wanted](https://github.com/dotnet/runtime/issues?q=is%3Aopen+is%3A ## See also - [`System.IO.Compression.Brotli`](../System.IO.Compression.Brotli#readme) - [`System.IO.Compression.ZipFile`](../System.IO.Compression.ZipFile#readme) - - [`System.IO.Compression.Zstandard`](../System.IO.Compression.Zstandard#readme) \ No newline at end of file diff --git a/src/libraries/System.IO.Compression/ref/System.IO.Compression.cs b/src/libraries/System.IO.Compression/ref/System.IO.Compression.cs index 412fa9f2a25535..564bbc97eb7511 100644 --- a/src/libraries/System.IO.Compression/ref/System.IO.Compression.cs +++ b/src/libraries/System.IO.Compression/ref/System.IO.Compression.cs @@ -194,4 +194,110 @@ public override void Write(System.ReadOnlySpan buffer) { } public override System.Threading.Tasks.ValueTask WriteAsync(System.ReadOnlyMemory buffer, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public override void WriteByte(byte value) { } } + [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")] + [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("wasi")] + public sealed partial class ZstandardCompressionOptions + { + public ZstandardCompressionOptions() { } + public bool AppendChecksum { get { throw null; } set { } } + public static int DefaultQuality { get { throw null; } } + public static int DefaultWindowLog { get { throw null; } } + public System.IO.Compression.ZstandardDictionary? Dictionary { get { throw null; } set { } } + public bool EnableLongDistanceMatching { get { throw null; } set { } } + public static int MaxQuality { get { throw null; } } + public static int MaxWindowLog { get { throw null; } } + public static int MinQuality { get { throw null; } } + public static int MinWindowLog { get { throw null; } } + public int Quality { get { throw null; } set { } } + public int TargetBlockSize { get { throw null; } set { } } + public int WindowLog { get { throw null; } set { } } + } + [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")] + [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("wasi")] + public sealed partial class ZstandardDecoder : System.IDisposable + { + public ZstandardDecoder() { } + public ZstandardDecoder(int maxWindowLog) { } + public ZstandardDecoder(System.IO.Compression.ZstandardDictionary dictionary) { } + public ZstandardDecoder(System.IO.Compression.ZstandardDictionary dictionary, int maxWindowLog) { } + public System.Buffers.OperationStatus Decompress(System.ReadOnlySpan source, System.Span destination, out int bytesConsumed, out int bytesWritten) { throw null; } + public void Dispose() { } + public void Reset() { } + public void SetPrefix(System.ReadOnlyMemory prefix) { } + public static bool TryDecompress(System.ReadOnlySpan source, System.Span destination, out int bytesWritten) { throw null; } + public static bool TryDecompress(System.ReadOnlySpan source, System.Span destination, out int bytesWritten, System.IO.Compression.ZstandardDictionary dictionary) { throw null; } + public static bool TryGetMaxDecompressedLength(System.ReadOnlySpan data, out long length) { throw null; } + } + [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")] + [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("wasi")] + public sealed partial class ZstandardDictionary : System.IDisposable + { + internal ZstandardDictionary() { } + public System.ReadOnlyMemory Data { get { throw null; } } + public static System.IO.Compression.ZstandardDictionary Create(System.ReadOnlySpan buffer) { throw null; } + public static System.IO.Compression.ZstandardDictionary Create(System.ReadOnlySpan buffer, int quality) { throw null; } + public void Dispose() { } + public static System.IO.Compression.ZstandardDictionary Train(System.ReadOnlySpan samples, System.ReadOnlySpan sampleLengths, int maxDictionarySize) { throw null; } + } + [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")] + [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("wasi")] + public sealed partial class ZstandardEncoder : System.IDisposable + { + public ZstandardEncoder() { } + public ZstandardEncoder(int quality) { } + public ZstandardEncoder(int quality, int windowLog) { } + public ZstandardEncoder(System.IO.Compression.ZstandardCompressionOptions compressionOptions) { } + public ZstandardEncoder(System.IO.Compression.ZstandardDictionary dictionary) { } + public ZstandardEncoder(System.IO.Compression.ZstandardDictionary dictionary, int windowLog) { } + public System.Buffers.OperationStatus Compress(System.ReadOnlySpan source, System.Span destination, out int bytesConsumed, out int bytesWritten, bool isFinalBlock) { throw null; } + public void Dispose() { } + public System.Buffers.OperationStatus Flush(System.Span destination, out int bytesWritten) { throw null; } + public static long GetMaxCompressedLength(long inputLength) { throw null; } + public void Reset() { } + public void SetPrefix(System.ReadOnlyMemory prefix) { } + public void SetSourceLength(long length) { } + public static bool TryCompress(System.ReadOnlySpan source, System.Span destination, out int bytesWritten) { throw null; } + public static bool TryCompress(System.ReadOnlySpan source, System.Span destination, out int bytesWritten, int quality, int windowLog) { throw null; } + public static bool TryCompress(System.ReadOnlySpan source, System.Span destination, out int bytesWritten, System.IO.Compression.ZstandardDictionary dictionary, int windowLog) { throw null; } + } + [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")] + [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("wasi")] + public sealed partial class ZstandardStream : System.IO.Stream + { + public ZstandardStream(System.IO.Stream stream, System.IO.Compression.CompressionLevel compressionLevel) { } + public ZstandardStream(System.IO.Stream stream, System.IO.Compression.CompressionLevel compressionLevel, bool leaveOpen) { } + public ZstandardStream(System.IO.Stream stream, System.IO.Compression.CompressionMode mode) { } + public ZstandardStream(System.IO.Stream stream, System.IO.Compression.CompressionMode mode, bool leaveOpen) { } + public ZstandardStream(System.IO.Stream stream, System.IO.Compression.CompressionMode mode, System.IO.Compression.ZstandardDictionary dictionary, bool leaveOpen = false) { } + public ZstandardStream(System.IO.Stream stream, System.IO.Compression.ZstandardCompressionOptions compressionOptions, bool leaveOpen = false) { } + public ZstandardStream(System.IO.Stream stream, System.IO.Compression.ZstandardDecoder decoder, bool leaveOpen = false) { } + public ZstandardStream(System.IO.Stream stream, System.IO.Compression.ZstandardEncoder encoder, bool leaveOpen = false) { } + public System.IO.Stream BaseStream { get { throw null; } } + public override bool CanRead { get { throw null; } } + public override bool CanSeek { get { throw null; } } + public override bool CanWrite { get { throw null; } } + public override long Length { get { throw null; } } + public override long Position { get { throw null; } set { } } + public override System.IAsyncResult BeginRead(byte[] buffer, int offset, int count, System.AsyncCallback? callback, object? state) { throw null; } + public override System.IAsyncResult BeginWrite(byte[] buffer, int offset, int count, System.AsyncCallback? callback, object? state) { throw null; } + protected override void Dispose(bool disposing) { } + public override System.Threading.Tasks.ValueTask DisposeAsync() { throw null; } + public override int EndRead(System.IAsyncResult asyncResult) { throw null; } + public override void EndWrite(System.IAsyncResult asyncResult) { } + public override void Flush() { } + public override System.Threading.Tasks.Task FlushAsync(System.Threading.CancellationToken cancellationToken) { throw null; } + public override int Read(byte[] buffer, int offset, int count) { throw null; } + public override int Read(System.Span buffer) { throw null; } + public override System.Threading.Tasks.Task ReadAsync(byte[] buffer, int offset, int count, System.Threading.CancellationToken cancellationToken) { throw null; } + public override System.Threading.Tasks.ValueTask ReadAsync(System.Memory buffer, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public override int ReadByte() { throw null; } + public override long Seek(long offset, System.IO.SeekOrigin origin) { throw null; } + public override void SetLength(long value) { } + public void SetSourceLength(long length) { } + public override void Write(byte[] buffer, int offset, int count) { } + public override void Write(System.ReadOnlySpan buffer) { } + public override System.Threading.Tasks.Task WriteAsync(byte[] buffer, int offset, int count, System.Threading.CancellationToken cancellationToken) { throw null; } + public override System.Threading.Tasks.ValueTask WriteAsync(System.ReadOnlyMemory buffer, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public override void WriteByte(byte value) { } + } } diff --git a/src/libraries/System.IO.Compression/src/Resources/Strings.resx b/src/libraries/System.IO.Compression/src/Resources/Strings.resx index 5fd5e9e3cedc88..8c2179d129717e 100644 --- a/src/libraries/System.IO.Compression/src/Resources/Strings.resx +++ b/src/libraries/System.IO.Compression/src/Resources/Strings.resx @@ -293,6 +293,69 @@ System.IO.Compression is not supported on this platform. + + Zstandard compression is not supported on this platform. + + + The compression level must be between {0} and {1}. + + + Cannot read from a stream that was opened for compression. + + + Cannot write to a stream that was opened for decompression. + + + The base stream is not readable. + + + The base stream is not writable. + + + The requested operation is not valid once compression or decompression has begun. + + + Found truncated data while decoding. + + + Data requires too much memory for decoding. Consider increasing the 'maxWindowLog' parameter. + + + The provided dictionary is not valid for decoding the current data. + + + Decoder encountered invalid data. + + + ZstandardStream.BaseStream returned more bytes than requested in Read. + + + Encoder encountered invalid data. + + + Only one pending read/write operation is supported. + + + Buffer cannot be empty. + + + Failed to create Zstandard compression dictionary. + + + Failed to create Zstandard decompression dictionary. + + + The sum of sample lengths does not match the length of the samples buffer. + + + At least {0} samples are required to train the dictionary. + + + Sample lengths must be positive values. + + + An internal error has occurred: {0}. + Invalid offset to the Zip64 End of Central Directory record. diff --git a/src/libraries/System.IO.Compression/src/System.IO.Compression.csproj b/src/libraries/System.IO.Compression/src/System.IO.Compression.csproj index 91ad2914646cd3..bcdcf1b3417f43 100644 --- a/src/libraries/System.IO.Compression/src/System.IO.Compression.csproj +++ b/src/libraries/System.IO.Compression/src/System.IO.Compression.csproj @@ -79,6 +79,26 @@ Link="Common\Interop\Unix\System.Native\Interop.Stat.cs" /> + + + + + + + + + + + + + + + + + + + + diff --git a/src/libraries/System.IO.Compression/src/System/IO/Compression/Zstandard/Zstandard.PlatformNotSupported.cs b/src/libraries/System.IO.Compression/src/System/IO/Compression/Zstandard/Zstandard.PlatformNotSupported.cs new file mode 100644 index 00000000000000..ffea4a91d779f0 --- /dev/null +++ b/src/libraries/System.IO.Compression/src/System/IO/Compression/Zstandard/Zstandard.PlatformNotSupported.cs @@ -0,0 +1,116 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +namespace System.IO.Compression +{ + [System.Runtime.Versioning.UnsupportedOSPlatform("browser")] + [System.Runtime.Versioning.UnsupportedOSPlatform("wasi")] + public sealed class ZstandardCompressionOptions + { + public ZstandardCompressionOptions() => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ZstandardCompression); + public bool AppendChecksum { get => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ZstandardCompression); set => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ZstandardCompression); } + public static int DefaultQuality => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ZstandardCompression); + public static int DefaultWindowLog => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ZstandardCompression); + public ZstandardDictionary? Dictionary { get => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ZstandardCompression); set => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ZstandardCompression); } + public bool EnableLongDistanceMatching { get => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ZstandardCompression); set => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ZstandardCompression); } + public static int MaxQuality => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ZstandardCompression); + public static int MaxWindowLog => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ZstandardCompression); + public static int MinQuality => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ZstandardCompression); + public static int MinWindowLog => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ZstandardCompression); + public int Quality { get => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ZstandardCompression); set => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ZstandardCompression); } + public int TargetBlockSize { get => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ZstandardCompression); set => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ZstandardCompression); } + public int WindowLog { get => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ZstandardCompression); set => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ZstandardCompression); } + } + + [System.Runtime.Versioning.UnsupportedOSPlatform("browser")] + [System.Runtime.Versioning.UnsupportedOSPlatform("wasi")] + public sealed class ZstandardDecoder : IDisposable + { + public ZstandardDecoder() => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ZstandardCompression); + public ZstandardDecoder(int maxWindowLog) => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ZstandardCompression); + public ZstandardDecoder(ZstandardDictionary dictionary) => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ZstandardCompression); + public ZstandardDecoder(ZstandardDictionary dictionary, int maxWindowLog) => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ZstandardCompression); + public System.Buffers.OperationStatus Decompress(ReadOnlySpan source, Span destination, out int bytesConsumed, out int bytesWritten) => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ZstandardCompression); + public void Dispose() { } + public void Reset() => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ZstandardCompression); + public void SetPrefix(ReadOnlyMemory prefix) => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ZstandardCompression); + public static bool TryDecompress(ReadOnlySpan source, Span destination, out int bytesWritten) => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ZstandardCompression); + public static bool TryDecompress(ReadOnlySpan source, Span destination, out int bytesWritten, ZstandardDictionary dictionary) => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ZstandardCompression); + public static bool TryGetMaxDecompressedLength(ReadOnlySpan data, out long length) => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ZstandardCompression); + } + + [System.Runtime.Versioning.UnsupportedOSPlatform("browser")] + [System.Runtime.Versioning.UnsupportedOSPlatform("wasi")] + public sealed class ZstandardDictionary : IDisposable + { + internal ZstandardDictionary() { } + public ReadOnlyMemory Data => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ZstandardCompression); + public static ZstandardDictionary Create(ReadOnlySpan buffer) => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ZstandardCompression); + public static ZstandardDictionary Create(ReadOnlySpan buffer, int quality) => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ZstandardCompression); + public void Dispose() { } + public static ZstandardDictionary Train(ReadOnlySpan samples, ReadOnlySpan sampleLengths, int maxDictionarySize) => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ZstandardCompression); + } + + [System.Runtime.Versioning.UnsupportedOSPlatform("browser")] + [System.Runtime.Versioning.UnsupportedOSPlatform("wasi")] + public sealed class ZstandardEncoder : IDisposable + { + public ZstandardEncoder() => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ZstandardCompression); + public ZstandardEncoder(int quality) => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ZstandardCompression); + public ZstandardEncoder(int quality, int windowLog) => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ZstandardCompression); + public ZstandardEncoder(ZstandardCompressionOptions compressionOptions) => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ZstandardCompression); + public ZstandardEncoder(ZstandardDictionary dictionary) => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ZstandardCompression); + public ZstandardEncoder(ZstandardDictionary dictionary, int windowLog) => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ZstandardCompression); + public System.Buffers.OperationStatus Compress(ReadOnlySpan source, Span destination, out int bytesConsumed, out int bytesWritten, bool isFinalBlock) => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ZstandardCompression); + public void Dispose() { } + public System.Buffers.OperationStatus Flush(Span destination, out int bytesWritten) => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ZstandardCompression); + public static long GetMaxCompressedLength(long inputLength) => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ZstandardCompression); + public void Reset() => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ZstandardCompression); + public void SetPrefix(ReadOnlyMemory prefix) => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ZstandardCompression); + public void SetSourceLength(long length) => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ZstandardCompression); + public static bool TryCompress(ReadOnlySpan source, Span destination, out int bytesWritten) => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ZstandardCompression); + public static bool TryCompress(ReadOnlySpan source, Span destination, out int bytesWritten, int quality, int windowLog) => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ZstandardCompression); + public static bool TryCompress(ReadOnlySpan source, Span destination, out int bytesWritten, ZstandardDictionary dictionary, int windowLog) => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ZstandardCompression); + } + + [System.Runtime.Versioning.UnsupportedOSPlatform("browser")] + [System.Runtime.Versioning.UnsupportedOSPlatform("wasi")] + public sealed partial class ZstandardStream : Stream + { + public ZstandardStream(Stream stream, CompressionLevel compressionLevel) : base() => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ZstandardCompression); + public ZstandardStream(Stream stream, CompressionLevel compressionLevel, bool leaveOpen) : base() => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ZstandardCompression); + public ZstandardStream(Stream stream, CompressionMode mode) : base() => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ZstandardCompression); + public ZstandardStream(Stream stream, CompressionMode mode, bool leaveOpen) : base() => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ZstandardCompression); + public ZstandardStream(Stream stream, CompressionMode mode, ZstandardDictionary dictionary, bool leaveOpen = false) : base() => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ZstandardCompression); + public ZstandardStream(Stream stream, ZstandardCompressionOptions compressionOptions, bool leaveOpen = false) : base() => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ZstandardCompression); + public ZstandardStream(Stream stream, ZstandardDecoder decoder, bool leaveOpen = false) : base() => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ZstandardCompression); + public ZstandardStream(Stream stream, ZstandardEncoder encoder, bool leaveOpen = false) : base() => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ZstandardCompression); + public Stream BaseStream => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ZstandardCompression); + public override bool CanRead => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ZstandardCompression); + public override bool CanSeek => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ZstandardCompression); + public override bool CanWrite => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ZstandardCompression); + public override long Length => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ZstandardCompression); + public override long Position { get => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ZstandardCompression); set => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ZstandardCompression); } + public override IAsyncResult BeginRead(byte[] buffer, int offset, int count, AsyncCallback? callback, object? state) => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ZstandardCompression); + public override IAsyncResult BeginWrite(byte[] buffer, int offset, int count, AsyncCallback? callback, object? state) => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ZstandardCompression); + protected override void Dispose(bool disposing) { } + public override System.Threading.Tasks.ValueTask DisposeAsync() => default; + public override int EndRead(IAsyncResult asyncResult) => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ZstandardCompression); + public override void EndWrite(IAsyncResult asyncResult) => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ZstandardCompression); + public override void Flush() => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ZstandardCompression); + public override System.Threading.Tasks.Task FlushAsync(System.Threading.CancellationToken cancellationToken) => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ZstandardCompression); + public override int Read(byte[] buffer, int offset, int count) => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ZstandardCompression); + public override int Read(Span buffer) => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ZstandardCompression); + public override System.Threading.Tasks.Task ReadAsync(byte[] buffer, int offset, int count, System.Threading.CancellationToken cancellationToken) => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ZstandardCompression); + public override System.Threading.Tasks.ValueTask ReadAsync(Memory buffer, System.Threading.CancellationToken cancellationToken = default) => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ZstandardCompression); + public override int ReadByte() => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ZstandardCompression); + public override long Seek(long offset, SeekOrigin origin) => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ZstandardCompression); + public override void SetLength(long value) => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ZstandardCompression); + public void SetSourceLength(long length) => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ZstandardCompression); + public override void Write(byte[] buffer, int offset, int count) => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ZstandardCompression); + public override void Write(ReadOnlySpan buffer) => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ZstandardCompression); + public override System.Threading.Tasks.Task WriteAsync(byte[] buffer, int offset, int count, System.Threading.CancellationToken cancellationToken) => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ZstandardCompression); + public override System.Threading.Tasks.ValueTask WriteAsync(ReadOnlyMemory buffer, System.Threading.CancellationToken cancellationToken = default) => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ZstandardCompression); + public override void WriteByte(byte value) => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ZstandardCompression); + } +} diff --git a/src/libraries/System.IO.Compression.Zstandard/src/System/IO/Compression/ZstandardCompressionOptions.cs b/src/libraries/System.IO.Compression/src/System/IO/Compression/Zstandard/ZstandardCompressionOptions.cs similarity index 97% rename from src/libraries/System.IO.Compression.Zstandard/src/System/IO/Compression/ZstandardCompressionOptions.cs rename to src/libraries/System.IO.Compression/src/System/IO/Compression/Zstandard/ZstandardCompressionOptions.cs index 925705c553f4d9..451b963211bf37 100644 --- a/src/libraries/System.IO.Compression.Zstandard/src/System/IO/Compression/ZstandardCompressionOptions.cs +++ b/src/libraries/System.IO.Compression/src/System/IO/Compression/Zstandard/ZstandardCompressionOptions.cs @@ -4,6 +4,8 @@ namespace System.IO.Compression { /// Provides compression options to be used with Zstandard compression. + [System.Runtime.Versioning.UnsupportedOSPlatform("browser")] + [System.Runtime.Versioning.UnsupportedOSPlatform("wasi")] public sealed class ZstandardCompressionOptions { /// Gets the default compression quality level. diff --git a/src/libraries/System.IO.Compression.Zstandard/src/System/IO/Compression/ZstandardDecoder.cs b/src/libraries/System.IO.Compression/src/System/IO/Compression/Zstandard/ZstandardDecoder.cs similarity index 99% rename from src/libraries/System.IO.Compression.Zstandard/src/System/IO/Compression/ZstandardDecoder.cs rename to src/libraries/System.IO.Compression/src/System/IO/Compression/Zstandard/ZstandardDecoder.cs index 1939f086e5dcec..c5a89178bcd6be 100644 --- a/src/libraries/System.IO.Compression.Zstandard/src/System/IO/Compression/ZstandardDecoder.cs +++ b/src/libraries/System.IO.Compression/src/System/IO/Compression/Zstandard/ZstandardDecoder.cs @@ -10,6 +10,8 @@ namespace System.IO.Compression { /// Provides methods and properties to decompress data using Zstandard decompression. + [System.Runtime.Versioning.UnsupportedOSPlatform("browser")] + [System.Runtime.Versioning.UnsupportedOSPlatform("wasi")] public sealed class ZstandardDecoder : IDisposable { private SafeZstdDecompressHandle _context; diff --git a/src/libraries/System.IO.Compression.Zstandard/src/System/IO/Compression/ZstandardDictionary.cs b/src/libraries/System.IO.Compression/src/System/IO/Compression/Zstandard/ZstandardDictionary.cs similarity index 98% rename from src/libraries/System.IO.Compression.Zstandard/src/System/IO/Compression/ZstandardDictionary.cs rename to src/libraries/System.IO.Compression/src/System/IO/Compression/Zstandard/ZstandardDictionary.cs index b8a33d711a960d..5672690ae458f0 100644 --- a/src/libraries/System.IO.Compression.Zstandard/src/System/IO/Compression/ZstandardDictionary.cs +++ b/src/libraries/System.IO.Compression/src/System/IO/Compression/Zstandard/ZstandardDictionary.cs @@ -10,6 +10,8 @@ namespace System.IO.Compression { /// Represents a Zstandard compression dictionary. + [System.Runtime.Versioning.UnsupportedOSPlatform("browser")] + [System.Runtime.Versioning.UnsupportedOSPlatform("wasi")] public sealed class ZstandardDictionary : IDisposable { private readonly SafeZstdCDictHandle _compressionDictionary; diff --git a/src/libraries/System.IO.Compression.Zstandard/src/System/IO/Compression/ZstandardEncoder.cs b/src/libraries/System.IO.Compression/src/System/IO/Compression/Zstandard/ZstandardEncoder.cs similarity index 99% rename from src/libraries/System.IO.Compression.Zstandard/src/System/IO/Compression/ZstandardEncoder.cs rename to src/libraries/System.IO.Compression/src/System/IO/Compression/Zstandard/ZstandardEncoder.cs index c6cb92d2e7c9e5..bae287f0da1f91 100644 --- a/src/libraries/System.IO.Compression.Zstandard/src/System/IO/Compression/ZstandardEncoder.cs +++ b/src/libraries/System.IO.Compression/src/System/IO/Compression/Zstandard/ZstandardEncoder.cs @@ -10,6 +10,8 @@ namespace System.IO.Compression { /// Provides methods and properties to compress data using Zstandard compression. + [System.Runtime.Versioning.UnsupportedOSPlatform("browser")] + [System.Runtime.Versioning.UnsupportedOSPlatform("wasi")] public sealed class ZstandardEncoder : IDisposable { internal SafeZstdCompressHandle _context; diff --git a/src/libraries/System.IO.Compression.Zstandard/src/System/IO/Compression/ZstandardStream.Compress.cs b/src/libraries/System.IO.Compression/src/System/IO/Compression/Zstandard/ZstandardStream.Compress.cs similarity index 100% rename from src/libraries/System.IO.Compression.Zstandard/src/System/IO/Compression/ZstandardStream.Compress.cs rename to src/libraries/System.IO.Compression/src/System/IO/Compression/Zstandard/ZstandardStream.Compress.cs diff --git a/src/libraries/System.IO.Compression.Zstandard/src/System/IO/Compression/ZstandardStream.Decompress.cs b/src/libraries/System.IO.Compression/src/System/IO/Compression/Zstandard/ZstandardStream.Decompress.cs similarity index 100% rename from src/libraries/System.IO.Compression.Zstandard/src/System/IO/Compression/ZstandardStream.Decompress.cs rename to src/libraries/System.IO.Compression/src/System/IO/Compression/Zstandard/ZstandardStream.Decompress.cs diff --git a/src/libraries/System.IO.Compression.Zstandard/src/System/IO/Compression/ZstandardStream.cs b/src/libraries/System.IO.Compression/src/System/IO/Compression/Zstandard/ZstandardStream.cs similarity index 99% rename from src/libraries/System.IO.Compression.Zstandard/src/System/IO/Compression/ZstandardStream.cs rename to src/libraries/System.IO.Compression/src/System/IO/Compression/Zstandard/ZstandardStream.cs index 6ecd78e0e7000c..051ed0de891e50 100644 --- a/src/libraries/System.IO.Compression.Zstandard/src/System/IO/Compression/ZstandardStream.cs +++ b/src/libraries/System.IO.Compression/src/System/IO/Compression/Zstandard/ZstandardStream.cs @@ -9,6 +9,8 @@ namespace System.IO.Compression { /// Provides methods and properties used to compress and decompress streams by using the Zstandard data format specification. + [System.Runtime.Versioning.UnsupportedOSPlatform("browser")] + [System.Runtime.Versioning.UnsupportedOSPlatform("wasi")] public sealed partial class ZstandardStream : Stream { private const int DefaultInternalBufferSize = 65536; // 64KB default buffer diff --git a/src/libraries/System.IO.Compression.Zstandard/src/System/IO/Compression/ZstandardUtils.cs b/src/libraries/System.IO.Compression/src/System/IO/Compression/Zstandard/ZstandardUtils.cs similarity index 100% rename from src/libraries/System.IO.Compression.Zstandard/src/System/IO/Compression/ZstandardUtils.cs rename to src/libraries/System.IO.Compression/src/System/IO/Compression/Zstandard/ZstandardUtils.cs diff --git a/src/libraries/System.IO.Compression/tests/System.IO.Compression.Tests.csproj b/src/libraries/System.IO.Compression/tests/System.IO.Compression.Tests.csproj index fa2d85fc0656da..284ccb348c15fb 100644 --- a/src/libraries/System.IO.Compression/tests/System.IO.Compression.Tests.csproj +++ b/src/libraries/System.IO.Compression/tests/System.IO.Compression.Tests.csproj @@ -58,4 +58,14 @@ + + + + + + + + + + diff --git a/src/libraries/System.IO.Compression.Zstandard/tests/CompressionStreamUnitTests.Zstandard.cs b/src/libraries/System.IO.Compression/tests/Zstandard/CompressionStreamUnitTests.Zstandard.cs similarity index 100% rename from src/libraries/System.IO.Compression.Zstandard/tests/CompressionStreamUnitTests.Zstandard.cs rename to src/libraries/System.IO.Compression/tests/Zstandard/CompressionStreamUnitTests.Zstandard.cs diff --git a/src/libraries/System.IO.Compression.Zstandard/tests/ZstandardCompressionOptionsTests.cs b/src/libraries/System.IO.Compression/tests/Zstandard/ZstandardCompressionOptionsTests.cs similarity index 100% rename from src/libraries/System.IO.Compression.Zstandard/tests/ZstandardCompressionOptionsTests.cs rename to src/libraries/System.IO.Compression/tests/Zstandard/ZstandardCompressionOptionsTests.cs diff --git a/src/libraries/System.IO.Compression.Zstandard/tests/ZstandardDictionaryTests.cs b/src/libraries/System.IO.Compression/tests/Zstandard/ZstandardDictionaryTests.cs similarity index 100% rename from src/libraries/System.IO.Compression.Zstandard/tests/ZstandardDictionaryTests.cs rename to src/libraries/System.IO.Compression/tests/Zstandard/ZstandardDictionaryTests.cs diff --git a/src/libraries/System.IO.Compression.Zstandard/tests/ZstandardEncoderDecoderTests.cs b/src/libraries/System.IO.Compression/tests/Zstandard/ZstandardEncoderDecoderTests.cs similarity index 100% rename from src/libraries/System.IO.Compression.Zstandard/tests/ZstandardEncoderDecoderTests.cs rename to src/libraries/System.IO.Compression/tests/Zstandard/ZstandardEncoderDecoderTests.cs diff --git a/src/libraries/System.IO.Compression.Zstandard/tests/ZstandardTestUtils.cs b/src/libraries/System.IO.Compression/tests/Zstandard/ZstandardTestUtils.cs similarity index 100% rename from src/libraries/System.IO.Compression.Zstandard/tests/ZstandardTestUtils.cs rename to src/libraries/System.IO.Compression/tests/Zstandard/ZstandardTestUtils.cs diff --git a/src/libraries/System.Net.Http/src/System.Net.Http.csproj b/src/libraries/System.Net.Http/src/System.Net.Http.csproj index fe0c89f1d9433b..5da63ed7045433 100644 --- a/src/libraries/System.Net.Http/src/System.Net.Http.csproj +++ b/src/libraries/System.Net.Http/src/System.Net.Http.csproj @@ -486,7 +486,7 @@ - + diff --git a/src/libraries/sfx.slnx b/src/libraries/sfx.slnx index 56e521660500cf..f4b375423c24ae 100644 --- a/src/libraries/sfx.slnx +++ b/src/libraries/sfx.slnx @@ -332,14 +332,6 @@ - - - - - - - -