diff options
| author | Stefan Boberg <[email protected]> | 2023-05-23 10:13:47 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-05-23 10:13:47 +0200 |
| commit | 633dee5f8688c104a04f0ec719b756dbbad7142f (patch) | |
| tree | f0ce192964f6d6b9fd506f4963e261320803e2ac /src/zencore/stream.cpp | |
| parent | MemoryView::RightChop -> const (diff) | |
| download | zen-633dee5f8688c104a04f0ec719b756dbbad7142f.tar.xz zen-633dee5f8688c104a04f0ec719b756dbbad7142f.zip | |
streaming decompression support (#142)
Added CompressedBufferReader support from UE. This provides some streaming decompression support which can be employed to reduce memory and other resource usage.
Diffstat (limited to 'src/zencore/stream.cpp')
| -rw-r--r-- | src/zencore/stream.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/zencore/stream.cpp b/src/zencore/stream.cpp index 3402e51be..ee97a53c4 100644 --- a/src/zencore/stream.cpp +++ b/src/zencore/stream.cpp @@ -51,6 +51,27 @@ BinaryWriter::Reset() } ////////////////////////////////////////////////////////////////////////// + +void +BufferReader::Seek(uint64_t InPos) +{ + // Validate range + m_Offset = InPos; +} + +int64_t +BufferReader::Tell() +{ + return CurrentOffset(); +} + +void +BufferReader::Serialize(void* V, int64_t Length) +{ + Read(V, Length); +} + +////////////////////////////////////////////////////////////////////////// // // Testing related code follows... // |