module C0
Defined in:
c0.crc0/builder.cr
c0/csv.cr
c0/diff.cr
c0/document.cr
c0/json.cr
c0/pretty.cr
c0/serializable.cr
c0/stream.cr
c0/table.cr
c0/token.cr
c0/tokenizer.cr
Constant Summary
-
ASSIGNED =
StaticArray[false, true, true, true, true, true, false, false, false, false, false, false, false, false, false, false, true, false, false, false, false, false, false, true, false, false, true, false, true, true, true, true] -
Set of assigned control code bytes for fast lookup
-
DLE =
16_u8 -
ENQ =
5_u8 -
EOT =
4_u8 -
ETB =
23_u8 -
ETX =
3_u8 -
FS =
28_u8 -
GS =
29_u8 -
RS =
30_u8 -
SOH =
1_u8 -
Assigned C0 control codes
-
STX =
2_u8 -
SUB =
26_u8 -
US =
31_u8 -
VERSION =
"0.9.1"
Class Method Summary
-
.canonical?(buf : Bytes) : Bool
Whether bytes are a canonical document unit for content addressing (see the C0 spec "Canonical Form"): well-formed, minimally escaped (DLE appears only before bytes < 0x20), and free of framing bytes (ETB, EOT).
-
.unescape(buf : Bytes) : Bytes
Decode DLE escapes, returning the logical bytes of a value.
Class Method Detail
def self.canonical?(buf : Bytes) : Bool
#
Whether bytes are a canonical document unit for content addressing (see the C0 spec "Canonical Form"): well-formed, minimally escaped (DLE appears only before bytes < 0x20), and free of framing bytes (ETB, EOT). Stream logs validate per-block, not with this check.
def self.unescape(buf : Bytes) : Bytes
#
Decode DLE escapes, returning the logical bytes of a value. Zero-copy (returns the input slice) when no escapes are present.