DataStreamExtensions
Extension methods for DataStream.
Read time 1 minuteLast updated 13 days ago
Definition
- Type: Class
- Namespace: Unity.Collections.LowLevel.Unsafe
- Assembly: UnityEngine.ManagedKernelModule
public static class DataStreamExtensions
Static Methods
Method | Description |
|---|---|
| Create | Initializes a new instance of the DataStreamWriter struct with externally owned memory |
| GetUnsafeReadOnlyPtr | Get a pointer to the stream's data. Note that the pointer always points at the beginning of the data, no matter how much was read from the stream. |
| ReadBytesUnsafe | Read and copy data to the memory location pointed to, an error will be logged if the |
| ReadFixedStringUnsafe | Reads a 2-byte length value from the current stream, reads the specified number of bytes to the buffer and advances the current position of the stream by the length of the string. |
| ReadPackedFixedStringDeltaUnsafe | Writes a delta FixedString value to the data stream using a StreamCompressionModel. |
| WriteBytesUnsafe | Appends a specified number of bytes from the buffer to the data stream. |