-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Closed
Labels
api-suggestionEarly API idea and discussion, it is NOT ready for implementationEarly API idea and discussion, it is NOT ready for implementationarea-System.IO.Compression
Milestone
Description
System.IO.Compression contains the DeflateStream class, that can decompress data from a stream. In case we have compressed data already loaded in a ReadOnlySpan<byte>, using DeflateStream might be little inefficient - we have to create a MemoryStream and this operation allocates a new array.
function Decompress(ReadOnlySpan<byte> block) {
using(var stream = new MemoryStream(block.ToArray())) {
using(var deflateStream = new DeflateStream(stream, CompressionMode.Decompress)) {
Data = ... read from deflateStream
}
}
}It would be great, if the Deflate algorithm is exposed in the way that supports processing data from ReadOnlySpan<byte>
RayKoopa, ddotlic and PaulusParssinen
Metadata
Metadata
Assignees
Labels
api-suggestionEarly API idea and discussion, it is NOT ready for implementationEarly API idea and discussion, it is NOT ready for implementationarea-System.IO.Compression