diff --git a/Essentials.CompressionProviders.Brotli/BrotliCompressionProvider.cs b/Essentials.CompressionProviders.Brotli/BrotliCompressionProvider.cs index 527ef79..2769bc2 100644 --- a/Essentials.CompressionProviders.Brotli/BrotliCompressionProvider.cs +++ b/Essentials.CompressionProviders.Brotli/BrotliCompressionProvider.cs @@ -246,10 +246,12 @@ public bool TryDecompress(Stream compressedData, Stream destination) /// Tries to decompress the data from the stream and write the result to the destination, asynchronously. /// /// - /// Genuinely asynchronous: no thread is held for the duration. - /// If this throws or returns false, the destination may hold a partial result. Cancellation still - /// flushes the trailer, so a truncated destination cannot be distinguished from a complete - /// decompression. Treat the destination as invalid unless the method returns true. + /// Genuinely asynchronous: no thread is held for the duration. The decompression stream wraps the + /// source rather than the destination, so disposing it writes nothing to the destination. + /// If this throws or returns false, the destination may hold a partial result. Decompressed bytes + /// carry no structure of their own, so a truncated destination cannot be distinguished from a + /// complete decompression by inspecting it. Treat the destination as invalid unless the method + /// returns true. /// /// The compressed data to decompress. /// The destination to write the decompressed data to. diff --git a/Essentials.CompressionProviders.Deflate/DeflateCompressionProvider.cs b/Essentials.CompressionProviders.Deflate/DeflateCompressionProvider.cs index a12df1a..365bc7a 100644 --- a/Essentials.CompressionProviders.Deflate/DeflateCompressionProvider.cs +++ b/Essentials.CompressionProviders.Deflate/DeflateCompressionProvider.cs @@ -246,10 +246,12 @@ public bool TryDecompress(Stream compressedData, Stream destination) /// Tries to decompress the data from the stream and write the result to the destination, asynchronously. /// /// - /// Genuinely asynchronous: no thread is held for the duration. - /// If this throws or returns false, the destination may hold a partial result. Cancellation still - /// flushes the trailer, so a truncated destination cannot be distinguished from a complete - /// decompression. Treat the destination as invalid unless the method returns true. + /// Genuinely asynchronous: no thread is held for the duration. The decompression stream wraps the + /// source rather than the destination, so disposing it writes nothing to the destination. + /// If this throws or returns false, the destination may hold a partial result. Decompressed bytes + /// carry no structure of their own, so a truncated destination cannot be distinguished from a + /// complete decompression by inspecting it. Treat the destination as invalid unless the method + /// returns true. /// /// The compressed data to decompress. /// The destination to write the decompressed data to. diff --git a/Essentials.CompressionProviders.Gzip/GzipCompressionProvider.cs b/Essentials.CompressionProviders.Gzip/GzipCompressionProvider.cs index 44f4f2a..468b7e1 100644 --- a/Essentials.CompressionProviders.Gzip/GzipCompressionProvider.cs +++ b/Essentials.CompressionProviders.Gzip/GzipCompressionProvider.cs @@ -247,10 +247,12 @@ public bool TryDecompress(Stream compressedData, Stream destination) /// Tries to decompress the data from the stream and write the result to the destination, asynchronously. /// /// - /// Genuinely asynchronous: no thread is held for the duration. - /// If this throws or returns false, the destination may hold a partial result. Cancellation still - /// flushes the trailer, so a truncated destination cannot be distinguished from a complete - /// decompression. Treat the destination as invalid unless the method returns true. + /// Genuinely asynchronous: no thread is held for the duration. The decompression stream wraps the + /// source rather than the destination, so disposing it writes nothing to the destination. + /// If this throws or returns false, the destination may hold a partial result. Decompressed bytes + /// carry no structure of their own, so a truncated destination cannot be distinguished from a + /// complete decompression by inspecting it. Treat the destination as invalid unless the method + /// returns true. /// /// The compressed data to decompress. /// The destination to write the decompressed data to. diff --git a/Essentials.CompressionProviders.ZLib/ZLibCompressionProvider.cs b/Essentials.CompressionProviders.ZLib/ZLibCompressionProvider.cs index 3f973e8..66a2d86 100644 --- a/Essentials.CompressionProviders.ZLib/ZLibCompressionProvider.cs +++ b/Essentials.CompressionProviders.ZLib/ZLibCompressionProvider.cs @@ -246,10 +246,12 @@ public bool TryDecompress(Stream compressedData, Stream destination) /// Tries to decompress the data from the stream and write the result to the destination, asynchronously. /// /// - /// Genuinely asynchronous: no thread is held for the duration. - /// If this throws or returns false, the destination may hold a partial result. Cancellation still - /// flushes the trailer, so a truncated destination cannot be distinguished from a complete - /// decompression. Treat the destination as invalid unless the method returns true. + /// Genuinely asynchronous: no thread is held for the duration. The decompression stream wraps the + /// source rather than the destination, so disposing it writes nothing to the destination. + /// If this throws or returns false, the destination may hold a partial result. Decompressed bytes + /// carry no structure of their own, so a truncated destination cannot be distinguished from a + /// complete decompression by inspecting it. Treat the destination as invalid unless the method + /// returns true. /// /// The compressed data to decompress. /// The destination to write the decompressed data to. diff --git a/Essentials.EncryptionProviders.Aes/AesEncryptionProvider.cs b/Essentials.EncryptionProviders.Aes/AesEncryptionProvider.cs index 9fd5da9..0af94be 100644 --- a/Essentials.EncryptionProviders.Aes/AesEncryptionProvider.cs +++ b/Essentials.EncryptionProviders.Aes/AesEncryptionProvider.cs @@ -290,10 +290,12 @@ public bool TryDecrypt(Stream data, ReadOnlySpan key, ReadOnlySpan i /// Tries to decrypt the data from the stream and write the result to the destination, asynchronously. /// /// - /// Genuinely asynchronous: no thread is held for the duration. - /// If this throws or returns false, the destination may hold a partial result. Cancellation still - /// flushes the final block, so a truncated destination cannot be distinguished from a complete - /// decryption. Treat the destination as invalid unless the method returns true. + /// Genuinely asynchronous: no thread is held for the duration. The decrypting stream wraps the + /// source rather than the destination, so disposing it writes nothing to the destination. + /// If this throws or returns false, the destination may hold a partial result. Recovered plaintext + /// carries no structure of its own, so a truncated destination cannot be distinguished from a + /// complete decryption by inspecting it. Treat the destination as invalid unless the method + /// returns true. /// /// The data to decrypt. /// The key to use for decryption.