seqeron 0.18.0
Loading...
Searching...
No Matches
Org.Limitless.Seqeron.Protocol.SnapshotFormat Class Reference

What a snapshot is (doc/snapshot.md §2): a sequence of records, the façade's header first, checked by the CRC-32C of their bytes in order that its SnapshotEnd carries. SnapshotFormat.java and Snapshot.hpp are its twins; keep the three in step. More...

Static Public Member Functions

static uint Crc32C (IDirectBuffer buffer, int offset, int length)
 The CRC-32C of a span of bytes, as SnapshotEnd.crc32c carries it.
 
static uint Update (uint crc, IDirectBuffer buffer, int offset, int length)
 Feeds bytes into a running CRC-32C.
 
static uint Update (uint crc, ReadOnlySpan< byte > bytes)
 Feeds bytes into a running CRC-32C.
 

Static Public Attributes

const int MaxRecordLength = 65535
 The most bytes one record holds: what its uint16 length prefix in the file can say.
 

Detailed Description

What a snapshot is (doc/snapshot.md §2): a sequence of records, the façade's header first, checked by the CRC-32C of their bytes in order that its SnapshotEnd carries. SnapshotFormat.java and Snapshot.hpp are its twins; keep the three in step.

Member Function Documentation

◆ Crc32C()

static uint Org.Limitless.Seqeron.Protocol.SnapshotFormat.Crc32C ( IDirectBuffer  buffer,
int  offset,
int  length 
)
inlinestatic

The CRC-32C of a span of bytes, as SnapshotEnd.crc32c carries it.

Parameters
bufferholding the bytes
offsetof the first
lengthhow many

◆ Update() [1/2]

static uint Org.Limitless.Seqeron.Protocol.SnapshotFormat.Update ( uint  crc,
IDirectBuffer  buffer,
int  offset,
int  length 
)
inlinestatic

Feeds bytes into a running CRC-32C.

Parameters
crcthe CRC of the bytes before these, or 0 to start
bufferholding the bytes
offsetof the first
lengthhow many
Returns
the CRC of everything so far

◆ Update() [2/2]

static uint Org.Limitless.Seqeron.Protocol.SnapshotFormat.Update ( uint  crc,
ReadOnlySpan< byte >  bytes 
)
inlinestatic

Feeds bytes into a running CRC-32C.

Parameters
crcthe CRC of the bytes before these, or 0 to start
bytesthe bytes
Returns
the CRC of everything so far

Member Data Documentation

◆ MaxRecordLength

const int Org.Limitless.Seqeron.Protocol.SnapshotFormat.MaxRecordLength = 65535
static

The most bytes one record holds: what its uint16 length prefix in the file can say.


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