UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FIoChunkEncoding Class Reference

#include <IoChunkEncoding.h>

Classes

struct  FHeader
 

Static Public Member Functions

static CORE_API bool Encode (const FIoChunkEncodingParams &Params, FMemoryView RawData, FIoBuffer &OutEncodedData)
 
static CORE_API bool Encode (const FIoChunkEncodingParams &Params, FMemoryView RawData, FIoBuffer &OutHeader, FIoBuffer &OutEncodedBlocks)
 
static CORE_API bool Decode (const FIoChunkDecodingParams &Params, FMemoryView EncodedBlocks, FMutableMemoryView OutRawData, EIoDecodeFlags Flags=EIoDecodeFlags::None)
 
static CORE_API bool Decode (FMemoryView EncodedData, FName CompressionFormat, FMemoryView EncryptionKey, FMutableMemoryView OutRawData, uint64 Offset=0)
 
static CORE_API FIoChunkBlockDecodeResult DecodeBlock (const FIoChunkBlockDecodingParams Params, FMutableMemoryView EncodedBlock, FMutableMemoryView OutDecodedBlock)
 
static CORE_API TIoStatusOr< FIoOffsetAndLengthGetChunkRange (uint64 TotalRawSize, uint32 RawBlockSize, TConstArrayView< uint32 > EncodedBlockSize, uint64 RawOffset, uint64 RawSize)
 
static CORE_API TIoStatusOr< FIoOffsetAndLengthGetChunkRange (const FIoChunkDecodingParams &Params, uint64 RawSize)
 
static CORE_API uint64 GetTotalEncodedSize (TConstArrayView< uint32 > EncodedBlockSize)
 
static CORE_API FIoBlockHash HashBlock (FMemoryView Block)
 

Static Public Attributes

static constexpr uint32 ExpectedMagic = 0x2e696f
 
static constexpr uint32 DefaultBlockSize = (64 << 10)
 
static constexpr uint32 MaxBlockCount = (1 << 24)
 
static constexpr uint64 MaxSize = (uint64(1) << 40)
 

Detailed Description

Encodes data into a set of encrypted and compressed blocks. The chunk encoding information is enocoded into a 16 byte header followed by N block sizes.

Member Function Documentation

◆ Decode() [1/2]

bool FIoChunkEncoding::Decode ( const FIoChunkDecodingParams Params,
FMemoryView  EncodedBlocks,
FMutableMemoryView  OutRawData,
EIoDecodeFlags  Flags = EIoDecodeFlags::None 
)
static

◆ Decode() [2/2]

bool FIoChunkEncoding::Decode ( FMemoryView  EncodedData,
FName  CompressionFormat,
FMemoryView  EncryptionKey,
FMutableMemoryView  OutRawData,
uint64  Offset = 0 
)
static

◆ DecodeBlock()

FIoChunkBlockDecodeResult FIoChunkEncoding::DecodeBlock ( const FIoChunkBlockDecodingParams  Params,
FMutableMemoryView  EncodedBlock,
FMutableMemoryView  OutDecodedBlock 
)
static

Decode a single I/O store chunk block.

Parameters
ParamsControls whether this function:
  • computes and verifys the block signature using the provided block hash
  • decrypts the block using the provided encryption key
  • decompress the source buffer to the destinatino buffer
EncodedBlockMemory view of the encoded source buffer. Assumes the underlying size is aligned to AES block size.
OutDecodedBlockMemory view of the destination buffer.
Note
This function does not copy the bytes from the encoded block unless it is compressed.

◆ Encode() [1/2]

bool FIoChunkEncoding::Encode ( const FIoChunkEncodingParams Params,
FMemoryView  RawData,
FIoBuffer OutEncodedData 
)
static

◆ Encode() [2/2]

bool FIoChunkEncoding::Encode ( const FIoChunkEncodingParams Params,
FMemoryView  RawData,
FIoBuffer OutHeader,
FIoBuffer OutEncodedBlocks 
)
static

◆ GetChunkRange() [1/2]

TIoStatusOr< FIoOffsetAndLength > FIoChunkEncoding::GetChunkRange ( const FIoChunkDecodingParams Params,
uint64  RawSize 
)
static

◆ GetChunkRange() [2/2]

TIoStatusOr< FIoOffsetAndLength > FIoChunkEncoding::GetChunkRange ( uint64  TotalRawSize,
uint32  RawBlockSize,
TConstArrayView< uint32 EncodedBlockSize,
uint64  RawOffset,
uint64  RawSize 
)
static

◆ GetTotalEncodedSize()

uint64 FIoChunkEncoding::GetTotalEncodedSize ( TConstArrayView< uint32 EncodedBlockSize)
static

◆ HashBlock()

FIoBlockHash FIoChunkEncoding::HashBlock ( FMemoryView  Block)
static

Member Data Documentation

◆ DefaultBlockSize

constexpr uint32 FIoChunkEncoding::DefaultBlockSize = (64 << 10)
staticconstexpr

◆ ExpectedMagic

constexpr uint32 FIoChunkEncoding::ExpectedMagic = 0x2e696f
staticconstexpr

◆ MaxBlockCount

constexpr uint32 FIoChunkEncoding::MaxBlockCount = (1 << 24)
staticconstexpr

◆ MaxSize

constexpr uint64 FIoChunkEncoding::MaxSize = (uint64(1) << 40)
staticconstexpr

The documentation for this class was generated from the following files: