summaryrefslogtreecommitdiff
path: root/docs/common/lib_common/xStream.txt
blob: 91e9c0eae0b390f3c9acccba386f8441a6ccc13f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
TITLE Various stream types

Some useful streams are implemented in lib/common.


SUBTITLE CollectInBufferStream

Described in it's own page.


SUBTITLE FileStream

Implements a stream from a file, allowing both reading and writing.


SUBTITLE MemBlockStream

Turns a memory block into a readable stream.

Can also be constructed using StreamableMemBlock, CollectInBufferStream and MemBlockStream as sources of the buffer.


SUBTITLE PartialReadStream

Create a readable stream which will read a set number of bytes from another stream, and then declare itself as closed.

Useful for extracting a small chunk of another stream to present to a function which expects to consume all of a stream.


SUBTITLE ReadGatherStream

Create a readable stream out of blocks from many streams -- so various sections of any number of streams are composed into a single stream.

To use, register each stream with AddComponent, then use the returned 'handle' with AddBlock to add blocks to the composed stream.

Optionally, the object will take ownership of the streams added, and delete them when itself is deleted.

See the comments in the function blocks in the cpp file for more info.