FCompressedBufferReader

A type that stores the state needed to decompress a compressed buffer.

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 FCompressedBufferReader

Remarks

A type that stores the state needed to decompress a compressed buffer.

The compressed buffer can be in memory or can be loaded from a seekable archive.

The reader can be reused across multiple source buffers, which allows its temporary buffers to be reused if they are the right size.

It is only safe to use the reader from one thread at a time.

Constructors

Name Description

Public function

FCompressedBufferReader()

Construct a reader with no source.

Public function

FCompressedBufferReader

(
    FArchive& Archive
)

Construct a reader that will read from an archive as needed.

Public function

FCompressedBufferReader

(
    const FCompressedBuffer& Buffer
)

Construct a reader from an in-memory compressed buffer.

Functions

Name Description

Public function

FSharedBuffe...

 

Decompress

(
    uint64 RawOffset,
    uint64 RawSize
)

Decompress into an owned buffer.

Public function

FCompositeBu...

 

DecompressToComposite

(
    uint64 RawOffset,
    uint64 RawSize
)

Decompress into an owned buffer.

Public function

uint64

 

GetCompressedSize()

Returns the size of the compressed data. Zero on error.

Public function

FBlake3Hash

 

GetRawHash()

Returns the hash of the raw data. Zero on error.

Public function

uint64

 

GetRawSize()

Returns the size of the raw data. Zero on error.

Public function Const

bool

 

HasSource()

Public function

void

 

ResetBuffers()

Release any temporary buffers that have been allocated by the reader.

Public function

void

 

ResetSource()

Clears the reference to the source without releasing temporary buffers.

Public function

void

 

SetSource

(
    FArchive& Archive
)

Public function

void

 

SetSource

(
    const FCompressedBuffer& Buffer
)

Public function

bool

 

TryDecompressTo

(
    FMutableMemoryView RawView,
    uint64 RawOffset
)

Decompress into a memory view that is less than or equal to the available raw size.

Public function

bool

 

TryGetCompressParameters

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

Returns the compressor and compression level used by this buffer.

See Also