Navigation
API > API/Runtime > API/Runtime/Core
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.
| Name | FCompressedBufferReader |
| Type | class |
| Header File | /Engine/Source/Runtime/Core/Public/Compression/CompressedBuffer.h |
| Include Path | #include "Compression/CompressedBuffer.h" |
Syntax
class FCompressedBufferReader
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| Construct a reader with no source. | Compression/CompressedBuffer.h | ||
FCompressedBufferReader
(
FArchive& Archive |
Construct a reader that will read from an archive as needed. | Compression/CompressedBuffer.h | |
FCompressedBufferReader
(
const FCompressedBuffer& Buffer |
Construct a reader from an in-memory compressed buffer. | Compression/CompressedBuffer.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Context | UE::CompressedBuffer::Private::FDecoderContext | Compression/CompressedBuffer.h | ||
| SourceArchive | FArchive * | Compression/CompressedBuffer.h | ||
| SourceBuffer | const FCompressedBuffer * | Compression/CompressedBuffer.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FSharedBuffer Decompress
(
uint64 RawOffset, |
Decompress into an owned buffer. | Compression/CompressedBuffer.h | |
FCompositeBuffer DecompressToComposite
(
uint64 RawOffset, |
Compression/CompressedBuffer.h | ||
uint64 GetCompressedSize() |
Returns the size of the compressed data. Zero on error. | Compression/CompressedBuffer.h | |
FIoHash GetRawHash() |
Returns the hash of the raw data. Zero on error. | Compression/CompressedBuffer.h | |
uint64 GetRawSize() |
Returns the size of the raw data. Zero on error. | Compression/CompressedBuffer.h | |
bool HasSource() |
Compression/CompressedBuffer.h | ||
void ResetBuffers() |
Release any temporary buffers that have been allocated by the reader. | Compression/CompressedBuffer.h | |
void ResetSource() |
Clears the reference to the source without releasing temporary buffers. | Compression/CompressedBuffer.h | |
| Compression/CompressedBuffer.h | |||
void SetSource
(
const FCompressedBuffer& Buffer |
Compression/CompressedBuffer.h | ||
bool TryDecompressTo
(
FMutableMemoryView RawView, |
Decompress into a memory view that is less than or equal to the available raw size. | Compression/CompressedBuffer.h | |
bool TryGetCompressParameters
(
ECompressedBufferCompressor& OutCompressor, |
Returns the compressor and compression level used by this buffer. | Compression/CompressedBuffer.h |