UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
UE::CompressedBuffer::Private::FHeader Struct Reference

Public Member Functions

void Write (const FMutableMemoryView HeaderView) const
 
void ByteSwap ()
 
bool TryGetCompressParameters (ECompressedBufferCompressor &OutCompressor, ECompressedBufferCompressionLevel &OutCompressionLevel, uint64 &OutBlockSize) const
 

Static Public Member Functions

static bool IsValid (const FCompositeBuffer &CompressedData)
 
static bool IsValid (const FSharedBuffer &CompressedData)
 
static FHeader Read (const FCompositeBuffer &CompressedData)
 
static uint32 CalculateCrc32 (const FMemoryView HeaderView)
 

Public Attributes

uint32 Magic = ExpectedMagic
 
uint32 Crc32 = 0
 
EMethod Method = EMethod::None
 
uint8 Compressor = 0
 
uint8 CompressionLevel = 0
 
uint8 BlockSizeExponent = 0
 
uint32 BlockCount = 0
 
uint64 TotalRawSize = 0
 
uint64 TotalCompressedSize = 0
 
FBlake3Hash RawHash
 

Static Public Attributes

static constexpr uint32 ExpectedMagic = 0xb7756362
 

Detailed Description

Header used on every compressed buffer. Always stored in big-endian format.

Member Function Documentation

◆ ByteSwap()

void UE::CompressedBuffer::Private::FHeader::ByteSwap ( )
inline

◆ CalculateCrc32()

static uint32 UE::CompressedBuffer::Private::FHeader::CalculateCrc32 ( const FMemoryView  HeaderView)
inlinestatic

Calculate the CRC-32 from a view of a header including any method-specific header data.

◆ IsValid() [1/2]

bool UE::CompressedBuffer::Private::FHeader::IsValid ( const FCompositeBuffer CompressedData)
static

Checks validity of the buffer based on the magic number, method, and CRC-32.

◆ IsValid() [2/2]

static bool UE::CompressedBuffer::Private::FHeader::IsValid ( const FSharedBuffer CompressedData)
inlinestatic

◆ Read()

static FHeader UE::CompressedBuffer::Private::FHeader::Read ( const FCompositeBuffer CompressedData)
inlinestatic

Read a header from a buffer that is at least sizeof(FHeader) without any validation.

◆ TryGetCompressParameters()

bool UE::CompressedBuffer::Private::FHeader::TryGetCompressParameters ( ECompressedBufferCompressor OutCompressor,
ECompressedBufferCompressionLevel OutCompressionLevel,
uint64 OutBlockSize 
) const
inline

◆ Write()

void UE::CompressedBuffer::Private::FHeader::Write ( const FMutableMemoryView  HeaderView) const
inline

Write a header to a memory view that is at least sizeof(FHeader).

Parameters
HeaderViewView of the header to write, including any method-specific header data.

Member Data Documentation

◆ BlockCount

uint32 UE::CompressedBuffer::Private::FHeader::BlockCount = 0

The number of blocks that follow the header.

◆ BlockSizeExponent

uint8 UE::CompressedBuffer::Private::FHeader::BlockSizeExponent = 0

The power of two size of every uncompressed block except the last. Size is 1 << BlockSizeExponent.

◆ CompressionLevel

uint8 UE::CompressedBuffer::Private::FHeader::CompressionLevel = 0

The method-specific compression level used to compress the buffer.

◆ Compressor

uint8 UE::CompressedBuffer::Private::FHeader::Compressor = 0

The method-specific compressor used to compress the buffer.

◆ Crc32

uint32 UE::CompressedBuffer::Private::FHeader::Crc32 = 0

A CRC-32 used to check integrity of the buffer. Uses the polynomial 0x04c11db7.

◆ ExpectedMagic

constexpr uint32 UE::CompressedBuffer::Private::FHeader::ExpectedMagic = 0xb7756362
staticconstexpr

◆ Magic

uint32 UE::CompressedBuffer::Private::FHeader::Magic = ExpectedMagic

A magic number to identify a compressed buffer. Always 0xb7756362.

◆ Method

EMethod UE::CompressedBuffer::Private::FHeader::Method = EMethod::None

The method used to compress the buffer. Affects layout of data following the header.

◆ RawHash

FBlake3Hash UE::CompressedBuffer::Private::FHeader::RawHash

The hash of the uncompressed data.

◆ TotalCompressedSize

uint64 UE::CompressedBuffer::Private::FHeader::TotalCompressedSize = 0

The total size of the compressed data including the header.

◆ TotalRawSize

uint64 UE::CompressedBuffer::Private::FHeader::TotalRawSize = 0

The total size of the uncompressed data.


The documentation for this struct was generated from the following file: