StreamCounter
A class in Alta.Serialization.Runtime, Alta.Serialization.
A write-only Stream that only counts bits, used to measure how big a serialized block will be (for example by SavingSystem and NetworkPrefab).
- Listed in Other Alta assemblies
- Inherits or implements
Stream
Constructors
| Member | What it is |
|---|---|
StreamCounter(uint offset) | Creates a StreamCounter from offset. |
Fields
2 private and internal fields
Properties
Methods
| Member | What it is |
|---|---|
override void Align() | Rounds the bit count up to the next whole byte. |
override void BackTrack(uint bitCount) | Subtracts bits from the count. |
override object Clone() | Copies the counter with its current count. |
override void Dispose() | Does nothing. |
override void SerializeBits(ref uint value, int bitCount) | Adds the bit count. |
override void SerializeString(ref string value, Stream.StringEncoding encoding = 0) | Adds a 16-bit length plus the aligned encoded bytes. |
protected override void SerializeBytes(byte[] value, int byteCount) | Adds 8 bits per byte. |