RecordBytes Module
Strict, byte-oriented primitives shared by official record readers.
Functions and values
| Function or value |
Description
|
Full Usage:
RecordBytes.ascii recordId name position length data
Parameters:
string
name : string
position : int
length : int
data : byte[]
Returns: Result<string, RecordParseError>
|
|
Full Usage:
RecordBytes.crlf recordId position data
Parameters:
string
position : int
data : byte[]
Returns: Result<unit, RecordParseError>
|
|
Full Usage:
RecordBytes.date recordId name position data
Parameters:
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.
|
Full Usage:
RecordBytes.envelope data
Parameters:
byte[]
Returns: Result<RecordEnvelope, RecordParseError>
|
Preserves an unknown record too; record-specific readers validate length/version separately.
|
Full Usage:
RecordBytes.field recordId name position length data
Parameters:
string
name : string
position : int
length : int
data : byte[]
Returns: Result<byte[], RecordParseError>
|
|
Full Usage:
RecordBytes.header data
Parameters:
byte[]
Returns: Result<RecordHeader, RecordParseError>
|
Reads the common eleven-byte prefix, independently of record version or payload length.
|
Full Usage:
RecordBytes.number allowSign scale recordId name position length data
Parameters:
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.
|
Full Usage:
RecordBytes.text recordId name position length data
Parameters:
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.
|
Xanthos