Logo Xanthos

RecordBytes Module

Strict, byte-oriented primitives shared by official record readers.

Functions and values

Function or value Description

RecordBytes.ascii recordId name position length data

Full Usage: RecordBytes.ascii recordId name position length data

Parameters:
    recordId : string
    name : string
    position : int
    length : int
    data : byte[]

Returns: Result<string, RecordParseError>
recordId : string
name : string
position : int
length : int
data : byte[]
Returns: Result<string, RecordParseError>

RecordBytes.crlf recordId position data

Full Usage: RecordBytes.crlf recordId position data

Parameters:
    recordId : string
    position : int
    data : byte[]

Returns: Result<unit, RecordParseError>
recordId : string
position : int
data : byte[]
Returns: Result<unit, RecordParseError>

RecordBytes.date recordId name position data

Full Usage: RecordBytes.date recordId name position data

Parameters:
    recordId : string
    name : string
    position : int
    data : byte[]

Returns: Result<(string * DateOnly option), RecordParseError>

All-zero dates are retained as missing; malformed nonzero dates are errors.

recordId : string
name : string
position : int
data : byte[]
Returns: Result<(string * DateOnly option), RecordParseError>

RecordBytes.envelope data

Full Usage: RecordBytes.envelope data

Parameters:
    data : byte[]

Returns: Result<RecordEnvelope, RecordParseError>

Preserves an unknown record too; record-specific readers validate length/version separately.

data : byte[]
Returns: Result<RecordEnvelope, RecordParseError>

RecordBytes.field recordId name position length data

Full Usage: RecordBytes.field recordId name position length data

Parameters:
    recordId : string
    name : string
    position : int
    length : int
    data : byte[]

Returns: Result<byte[], RecordParseError>
recordId : string
name : string
position : int
length : int
data : byte[]
Returns: Result<byte[], RecordParseError>

RecordBytes.header data

Full Usage: RecordBytes.header data

Parameters:
    data : byte[]

Returns: Result<RecordHeader, RecordParseError>

Reads the common eleven-byte prefix, independently of record version or payload length.

data : byte[]
Returns: Result<RecordHeader, RecordParseError>

RecordBytes.number allowSign scale recordId name position length data

Full Usage: RecordBytes.number allowSign scale recordId name position length data

Parameters:
    allowSign : bool
    scale : decimal
    recordId : string
    name : string
    position : int
    length : int
    data : byte[]

Returns: Result<decimal option, RecordParseError>

Only blanks mean missing here. Zero remains a numeric value; signs require explicit permission.

allowSign : bool
scale : decimal
recordId : string
name : string
position : int
length : int
data : byte[]
Returns: Result<decimal option, RecordParseError>

RecordBytes.text recordId name position length data

Full Usage: RecordBytes.text recordId name position length data

Parameters:
    recordId : string
    name : string
    position : int
    length : int
    data : byte[]

Returns: Result<string, RecordParseError>

Decode exactly one field; do not trim or normalize Japanese or ASCII spaces.

recordId : string
name : string
position : int
length : int
data : byte[]
Returns: Result<string, RecordParseError>

Type something to start searching.