FCompressedBuffer

A compressed buffer stores compressed data in a self-contained format.

Choose your operating system:

Windows

macOS

Linux

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/Compression/CompressedBuffer.h

Include

#include "Compression/CompressedBuffer.h"

Syntax

class FCompressedBuffer

Remarks

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.

Functions

Name Description

Public function Static

FCompressedB...

 

Compress

(
    const FCompositeBuffer& RawData,
    ECompressedBufferCompressor Compres...,
    ECompressedBufferCompressionLevel C...,
    uint64 BlockSize
)

Compress the buffer using the specified compressor and compression level.

Public function Static

FCompressedB...

 

Compress

(
    const FSharedBuffer& RawData
)

Compress the buffer using a balanced level of compression.

Public function Static

FCompressedB...

 

Compress

(
    const FCompositeBuffer& RawData
)

Compress the buffer using a balanced level of compression.

Public function Static

FCompressedB...

 

Compress

(
    const FSharedBuffer& RawData,
    ECompressedBufferCompressor Compres...,
    ECompressedBufferCompressionLevel C...,
    uint64 BlockSize
)

Public function Const

FSharedBuffe...

 

Decompress()

Decompress into an owned buffer.

Public function Const

FCompositeBu...

 

DecompressToComposite()

Decompress into an owned buffer.

Public function Static

FCompressedB...

 

FromCompressed

(
    FCompositeBuffer&& CompressedData
)

Construct from a compressed buffer previously created by Compress().

Public function Static

FCompressedB...

 

FromCompressed

(
    const FSharedBuffer& CompressedDat...
)

Construct from a compressed buffer previously created by Compress().

Public function Static

FCompressedB...

 

FromCompressed

(
    FSharedBuffer&& CompressedData
)

Construct from a compressed buffer previously created by Compress().

Public function Static

FCompressedB...

 

FromCompressed

(
    const FCompositeBuffer& Compressed...
)

Construct from a compressed buffer previously created by Compress().

Public function Const

const FCompo...

 

GetCompressed()

Returns a composite buffer containing the compressed data. May be null. May not be owned.

Public function

FCompositeBu...

 

GetCompressed()

Public function Const

uint64

 

GetCompressedSize()

Returns the size of the compressed data. Zero on error or if this is null.

Public function Const

FBlake3Hash

 

GetRawHash()

Returns the hash of the raw data. Zero on error or if this is null.

Public function Const

uint64

 

GetRawSize()

Returns the size of the raw data. Zero on error or if this is empty or null.

Public function Const

bool

 

IsNull()

Returns true if the compressed buffer is null.

Public function Const

bool

 

IsOwned()

Returns true if the composite buffer is owned.

Public function Static

FCompressedB...

 

Load

(
    FArchive& Ar
)

Load a compressed buffer from an archive, as saved by Save().

Public function

FCompressedB...

 

MakeOwned()

Public function Const

FCompressedB...

 

MakeOwned()

Returns a copy of the compressed buffer that owns its underlying memory.

Public function

void

 

Reset()

Reset this to null.

Public function Const

void

 

Save

(
    FArchive& Ar
)

Save the compressed buffer to an archive.

Public function Const

bool

 

TryDecompressTo

(
    FMutableMemoryView RawView
)

Decompress into a memory view that is exactly equal to the raw size.

Public function Const

bool

 

TryGetCompressParameters

(
    ECompressedBufferCompressor& OutCo...,
    ECompressedBufferCompressionLevel&...,
    uint64& OutBlockSize
)

Returns the compressor and compression level used by this buffer.

Operators

Name Description

Public function Const

 

operator bool()

Returns true if the compressed buffer is not null.

Constants

Name

Description

Null

A null compressed buffer.

See Also