1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-25 15:54:31 +01:00

Use IStream for zip streaming

This commit is contained in:
Ted John
2021-01-20 20:42:03 +00:00
parent 2aa2a94a7e
commit d9b8413ec4
14 changed files with 263 additions and 209 deletions

View File

@@ -51,6 +51,16 @@ namespace OpenRCT2
{
}
MemoryStream::MemoryStream(std::vector<uint8_t>&& v)
{
_access = MEMORY_ACCESS::OWNER;
_dataCapacity = v.size();
_dataSize = v.size();
_data = Memory::Allocate<void>(v.size());
_position = _data;
std::memcpy(_data, v.data(), v.size());
}
MemoryStream::MemoryStream(MemoryStream&& mv) noexcept
: _access(mv._access)
, _dataCapacity(mv._dataCapacity)