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