Class StreamUtilities
Contains some utility functions related to streams
Namespace: WeaverCore.Utilities
Assembly: WeaverCore.dll
Syntax
public static class StreamUtilities
Methods
| Edit this page View SourceCopyTo(Stream, Stream, int, bool)
Copies all data from one stream to another
Declaration
public static void CopyTo(this Stream source, Stream destination, int bufferSize = 2048, bool resetPosition = true)
Parameters
| Type | Name | Description |
|---|---|---|
| Stream | source | The source stream |
| Stream | destination | The destination stream |
| int | bufferSize | The buffer size. The data will be copied in chunks of this size |
| bool | resetPosition | Should positions of the streams be reset when done? |
Decompress(Stream, Stream)
Decompresses a compressed stream of data
Declaration
public static void Decompress(this Stream source, Stream destination)
Parameters
| Type | Name | Description |
|---|---|---|
| Stream | source | The source stream to extract from |
| Stream | destination | The stream to send the decompressed data to |