FBitWriter

Writes bitstreams.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/Serialization/BitWriter.h

Include

#include "Serialization/BitWriter.h"

Syntax

struct FBitWriter : public FBitArchive

Remarks

Writes bitstreams.

Constructors

Name Description

Public function

FBitWriter()

Default constructor. Zeros everything.

Public function

FBitWriter

(
    FBitWriter&
)

Public function

FBitWriter

(
    FBitWriter&&
)

Public function

FBitWriter

(
    int64 InMaxBits,
    bool AllowResize
)

Constructor using known size the buffer needs to be

Functions

Name Description

Public function

bool

 

AllowAppend

(
    int64 LengthBits
)

Public function Virtual Const

void

 

CountMemory

(
    FArchive& Ar
)

Counts the in-memory bytes used by this object

Public function Const

const TArray...

 

GetBuffer()

Public function Const

const uint8 ...

 

GetData()

Public function

uint8 *

 

GetData()

Returns a pointer to our internal buffer.

Public function Const

int64

 

GetMaxBits()

Returns the number of bits the buffer supports.

Public function Const

int64

 

GetNumBits()

Returns the number of bits written.

Public function Const

int64

 

GetNumBytes()

Returns the number of bytes written.

Public function

void

 

SetAllowOverflow

(
    bool bInAllow
)

Sets whether or not this writer intentionally allows overflows (to avoid logspam)

Public function

void

 

SetAllowResize

(
    bool NewResize
)

Public function

void

 

SetOverflowed

(
    int32 LengthBits
)

Marks this bit writer as overflowed.

Public function

void

 

WriteAlign()

Public function

void

 

WriteBit

(
    uint8 In
)

Public function

void

 

WriteIntWrapped

(
    uint32 Value,
    uint32 ValueMax
)

Serializes the specified Value, but does not bounds check against ValueMax; instead, it will wrap around if the value exceeds ValueMax (this differs from SerializeInt, which clamps)

Overridden from FBitArchive

Name Description

Public function Virtual

void

 

SerializeBitsWithOffset

(
    void* Src,
    int32 SourceBit,
    int64 LengthBits
)

Overridden from FArchive

Name Description

Public function Virtual

void

 

Serialize

(
    void* Src,
    int64 LengthBytes
)

Public function Virtual

void

 

SerializeBits

(
    void* Src,
    int64 LengthBits
)

Public function Virtual

void

 

SerializeInt

(
    uint32& Value,
    uint32 Max
)

Serializes a compressed integer - Value must be < Max

Public function Virtual

void

 

SerializeIntPacked

(
    uint32& Value
)

This function is bit compatible with FArchive::SerializeIntPacked.

Overridden from FArchiveState

Name Description

Public function Virtual

void

 

Reset()

Resets the bit writer back to its initial state

Operators

Name Description

Public function

FBitWriter &

 

operator=

(
    FBitWriter&&
)

Public function

FBitWriter &

 

operator=

(
    const FBitWriter&
)

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss