Table of Contents

Namespace Cuemon.Extensions.IO

Assembly: Cuemon.Extensions.IO.dll

Convert strings and byte arrays to streams, compress and decompress using Brotli, Deflate, or GZip, detect unicode encoding, and read text content asynchronously. Use this namespace when you need comprehensive I/O operations like stream compression, encoding detection, or string-to-stream conversion. Start with ToStream on String or byte[] for stream conversion, or CompressGZip on Stream for compression.

Availability: .NET 10, .NET 9, .NET Standard 2.1 and .NET Standard 2.0

Complements: Cuemon.IO namespace 🔗

Extension Members

Type Ext Methods
byte[] ⬇️ ToStream, ToStreamAsync
Stream ⬇️ Concat, ToCharArray, ToByteArray, ToByteArrayAsync, WriteAllAsync, TryDetectUnicodeEncoding, ToEncodedString, ToEncodedStringAsync, CompressBrotli, CompressBrotliAsync, CompressDeflate, CompressDeflateAsync, CompressGZip, CompressGZipAsync, DecompressBrotli, DecompressBrotliAsync, DecompressDeflate, DecompressDeflateAsync, DecompressGZip, DecompressGZipAsync
String ⬇️ ToStream, ToStreamAsync, ToTextReader
TextReader ⬇️ CopyToAsync, ReadAllLines, ReadAllLinesAsync

Classes

ByteArrayExtensions

Extension methods for the byte[].

StreamExtensions

Extension methods for the Stream class.

StringExtensions

Extension methods for the string class.

TextReaderExtensions

Extension methods for the TextReader class.