![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <CompressedBuffer.h>
Public Member Functions | |
| CORE_API void | Save (FArchive &Ar) const |
| void | Reset () |
| operator bool () const | |
| bool | IsNull () const |
| bool | IsOwned () const |
| FCompressedBuffer | MakeOwned () const & |
| FCompressedBuffer | MakeOwned () && |
| const FCompositeBuffer & | GetCompressed () const & |
| FCompositeBuffer | GetCompressed () && |
| CORE_API uint64 | GetCompressedSize () const |
| CORE_API uint64 | GetRawSize () const |
| CORE_API FIoHash | GetRawHash () const |
| CORE_API bool | TryGetCompressParameters (ECompressedBufferCompressor &OutCompressor, ECompressedBufferCompressionLevel &OutCompressionLevel, uint64 &OutBlockSize) const |
| CORE_API bool | TryDecompressTo (FMutableMemoryView RawView, ECompressedBufferDecompressFlags Flags=ECompressedBufferDecompressFlags::None) const |
| CORE_API FSharedBuffer | Decompress () const |
| CORE_API FCompositeBuffer | DecompressToComposite () const |
Static Public Member Functions | |
| static CORE_API FCompressedBuffer | Compress (const FCompositeBuffer &RawData) |
| static CORE_API FCompressedBuffer | Compress (const FSharedBuffer &RawData) |
| static CORE_API FCompressedBuffer | Compress (const FCompositeBuffer &RawData, ECompressedBufferCompressor Compressor, ECompressedBufferCompressionLevel CompressionLevel, uint64 BlockSize=0) |
| static CORE_API FCompressedBuffer | Compress (const FSharedBuffer &RawData, ECompressedBufferCompressor Compressor, ECompressedBufferCompressionLevel CompressionLevel, uint64 BlockSize=0) |
| static CORE_API FCompressedBuffer | FromCompressed (const FCompositeBuffer &CompressedData) |
| static CORE_API FCompressedBuffer | FromCompressed (FCompositeBuffer &&CompressedData) |
| static CORE_API FCompressedBuffer | FromCompressed (const FSharedBuffer &CompressedData) |
| static CORE_API FCompressedBuffer | FromCompressed (FSharedBuffer &&CompressedData) |
| static CORE_API FCompressedBuffer | Load (FArchive &Ar) |
Static Public Attributes | |
| static CORE_API const FCompressedBuffer | Null |
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.
|
static |
Compress the buffer using a balanced level of compression.
|
static |
Compress the buffer using the specified compressor and compression level.
Data that does not compress will be return uncompressed, as if with level None.
| RawData | The raw data to be compressed. |
| Compressor | The compressor to encode with. May use NotSet if level is None. |
| CompressionLevel | The compression level to encode with. |
| BlockSize | The power-of-two block size to encode raw data in. 0 is default. |
|
static |
|
static |
| FSharedBuffer FCompressedBuffer::Decompress | ( | ) | const |
Decompress into an owned buffer.
| FCompositeBuffer FCompressedBuffer::DecompressToComposite | ( | ) | const |
|
static |
Construct from a compressed buffer previously created by Compress().
|
static |
|
static |
|
static |
|
inline |
|
inline |
Returns a composite buffer containing the compressed data. May be null. May not be owned.
| uint64 FCompressedBuffer::GetCompressedSize | ( | ) | const |
Returns the size of the compressed data. Zero on error or if this is null.
| FIoHash FCompressedBuffer::GetRawHash | ( | ) | const |
Returns the hash of the raw data. Zero on error or if this is null.
| uint64 FCompressedBuffer::GetRawSize | ( | ) | const |
Returns the size of the raw data. Zero on error or if this is empty or null.
|
inline |
Returns true if the compressed buffer is null.
|
inline |
Returns true if the composite buffer is owned.
|
static |
Load a compressed buffer from an archive, as saved by Save().
The entire compressed buffer will be loaded from the archive before this function returns. Prefer to use FCompressedBufferReader to stream from an archive when the compressed buffer does not need to be fully loaded into memory.
|
inline |
|
inline |
Returns a copy of the compressed buffer that owns its underlying memory.
|
inlineexplicit |
Returns true if the compressed buffer is not null.
|
inline |
Reset this to null.
| bool FCompressedBuffer::TryDecompressTo | ( | FMutableMemoryView | RawView, |
| ECompressedBufferDecompressFlags | Flags = ECompressedBufferDecompressFlags::None |
||
| ) | const |
Decompress into a memory view that is exactly equal to the raw size.
| bool FCompressedBuffer::TryGetCompressParameters | ( | ECompressedBufferCompressor & | OutCompressor, |
| ECompressedBufferCompressionLevel & | OutCompressionLevel, | ||
| uint64 & | OutBlockSize | ||
| ) | const |
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.
|
static |
A null compressed buffer.