Navigation
API > API/Runtime > API/Runtime/Core
A compressed buffer stores compressed data in a self-contained format.
A buffer is self-contained in the sense that it can be decompressed without external knowledge of the compression format or the size of the raw data.
The buffer may be partially decompressed using FCompressedBufferReader.
| Name | FCompressedBuffer |
| Type | class |
| Header File | /Engine/Source/Runtime/Core/Public/Compression/CompressedBuffer.h |
| Include Path | #include "Compression/CompressedBuffer.h" |
Syntax
class FCompressedBuffer
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| Null | const FCompressedBuffer | A null compressed buffer. | Compression/CompressedBuffer.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| CompressedData | FCompositeBuffer | Compression/CompressedBuffer.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FSharedBuffer Decompress() |
Decompress into an owned buffer. | Compression/CompressedBuffer.h | |
FCompositeBuffer DecompressToComposite() |
Compression/CompressedBuffer.h | ||
const FCompositeBuffer & GetCompressed () |
Returns a composite buffer containing the compressed data. May be null. May not be owned. | Compression/CompressedBuffer.h | |
| Compression/CompressedBuffer.h | |||
uint64 GetCompressedSize() |
Returns the size of the compressed data. Zero on error or if this is null. | Compression/CompressedBuffer.h | |
FIoHash GetRawHash() |
Returns the hash of the raw data. Zero on error or if this is null. | Compression/CompressedBuffer.h | |
uint64 GetRawSize() |
Returns the size of the raw data. Zero on error or if this is empty or null. | Compression/CompressedBuffer.h | |
bool IsNull() |
Returns true if the compressed buffer is null. | Compression/CompressedBuffer.h | |
bool IsOwned() |
Returns true if the composite buffer is owned. | Compression/CompressedBuffer.h | |
| Compression/CompressedBuffer.h | |||
| Returns a copy of the compressed buffer that owns its underlying memory. | Compression/CompressedBuffer.h | ||
void Reset() |
Reset this to null. | Compression/CompressedBuffer.h | |
void Save
(
FArchive& Ar |
Save the compressed buffer to an archive. | Compression/CompressedBuffer.h | |
bool TryDecompressTo
(
FMutableMemoryView RawView, |
Decompress into a memory view that is exactly equal to the raw size. | Compression/CompressedBuffer.h | |
bool TryGetCompressParameters
(
ECompressedBufferCompressor& OutCompressor, |
Returns the compressor and compression level used by this buffer. | Compression/CompressedBuffer.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static FCompressedBuffer Compress
(
const FCompositeBuffer& RawData, |
Compress the buffer using the specified compressor and compression level. | Compression/CompressedBuffer.h | |
static FCompressedBuffer Compress
(
const FSharedBuffer& RawData |
Compression/CompressedBuffer.h | ||
static FCompressedBuffer Compress
(
const FCompositeBuffer& RawData |
Compress the buffer using a balanced level of compression. | Compression/CompressedBuffer.h | |
static FCompressedBuffer Compress
(
const FSharedBuffer& RawData, |
Compression/CompressedBuffer.h | ||
static FCompressedBuffer FromCompressed
(
FCompositeBuffer&& CompressedData |
Compression/CompressedBuffer.h | ||
static FCompressedBuffer FromCompressed
(
const FSharedBuffer& CompressedData |
Compression/CompressedBuffer.h | ||
static FCompressedBuffer FromCompressed
(
FSharedBuffer&& CompressedData |
Compression/CompressedBuffer.h | ||
static FCompressedBuffer FromCompressed
(
const FCompositeBuffer& CompressedData |
Construct from a compressed buffer previously created by Compress(). | Compression/CompressedBuffer.h | |
static FCompressedBuffer Load
(
FArchive& Ar |
Load a compressed buffer from an archive, as saved by Save(). | Compression/CompressedBuffer.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
operator bool() |
Returns true if the compressed buffer is not null. | Compression/CompressedBuffer.h |