![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <CompressedBuffer.h>
Public Member Functions | |
| FCompressedBufferReader ()=default | |
| CORE_API | FCompressedBufferReader (FArchive &Archive) |
| CORE_API | FCompressedBufferReader (const FCompressedBuffer &Buffer) |
| CORE_API void | ResetBuffers () |
| CORE_API void | ResetSource () |
| CORE_API void | SetSource (FArchive &Archive) |
| CORE_API void | SetSource (const FCompressedBuffer &Buffer) |
| bool | HasSource () const |
| CORE_API uint64 | GetCompressedSize () |
| CORE_API uint64 | GetRawSize () |
| CORE_API FIoHash | GetRawHash () |
| CORE_API bool | TryGetCompressParameters (ECompressedBufferCompressor &OutCompressor, ECompressedBufferCompressionLevel &OutCompressionLevel, uint64 &OutBlockSize) |
| CORE_API bool | TryDecompressTo (FMutableMemoryView RawView, uint64 RawOffset=0, ECompressedBufferDecompressFlags Flags=ECompressedBufferDecompressFlags::None) |
| CORE_API FSharedBuffer | Decompress (uint64 RawOffset=0, uint64 RawSize=MAX_uint64) |
| CORE_API FCompositeBuffer | DecompressToComposite (uint64 RawOffset=0, uint64 RawSize=MAX_uint64) |
A type that stores the state needed to decompress a compressed buffer.
The compressed buffer can be in memory or can be loaded from a seekable archive.
The reader can be reused across multiple source buffers, which allows its temporary buffers to be reused if they are the right size.
It is only safe to use the reader from one thread at a time.
|
default |
Construct a reader with no source.
|
explicit |
Construct a reader that will read from an archive as needed.
|
explicit |
Construct a reader from an in-memory compressed buffer.
| FSharedBuffer FCompressedBufferReader::Decompress | ( | uint64 | RawOffset = 0, |
| uint64 | RawSize = MAX_uint64 |
||
| ) |
Decompress into an owned buffer.
RawOffset must be at most the raw buffer size. RawSize may be MAX_uint64 to read the whole buffer from RawOffset, and must otherwise fit within the bounds of the buffer.
| RawOffset | The offset into the raw data from which to decompress. |
| RawSize | The size of the raw data to read from the offset. |
| FCompositeBuffer FCompressedBufferReader::DecompressToComposite | ( | uint64 | RawOffset = 0, |
| uint64 | RawSize = MAX_uint64 |
||
| ) |
| uint64 FCompressedBufferReader::GetCompressedSize | ( | ) |
Returns the size of the compressed data. Zero on error.
| FIoHash FCompressedBufferReader::GetRawHash | ( | ) |
Returns the hash of the raw data. Zero on error.
| uint64 FCompressedBufferReader::GetRawSize | ( | ) |
Returns the size of the raw data. Zero on error.
|
inline |
| void FCompressedBufferReader::ResetBuffers | ( | ) |
Release any temporary buffers that have been allocated by the reader.
| void FCompressedBufferReader::ResetSource | ( | ) |
Clears the reference to the source without releasing temporary buffers.
| void FCompressedBufferReader::SetSource | ( | const FCompressedBuffer & | Buffer | ) |
| bool FCompressedBufferReader::TryDecompressTo | ( | FMutableMemoryView | RawView, |
| uint64 | RawOffset = 0, |
||
| ECompressedBufferDecompressFlags | Flags = ECompressedBufferDecompressFlags::None |
||
| ) |
Decompress into a memory view that is less than or equal to the available raw size.
| RawView | The view to write to. The size to read is equal to the view size. |
| RawOffset | The offset into the raw data from which to decompress. |
| bool FCompressedBufferReader::TryGetCompressParameters | ( | ECompressedBufferCompressor & | OutCompressor, |
| ECompressedBufferCompressionLevel & | OutCompressionLevel, | ||
| uint64 & | OutBlockSize | ||
| ) |
Returns the compressor and compression level used by this buffer.
The compressor and compression level may differ from those specified when creating the buffer because an incompressible buffer is stored with no compression. Parameters cannot be accessed if this is null or uses a method other than Oodle, in which case this returns false.