gizlang:runtime
The runtime written in Gizlang: what the compiler lowers a construct to (the compiler appends this module wherever string( occurs). string(x) of bytes checks them with utf8Valid, which bytes.isUtf8 (gizlang:text) shares.
import * as Runtime from "gizlang:runtime";Functions
blockAt
function blockAt(data: bytes, i: i64, end: i64): u8x3232 bytes of data from i, zeros past end (never read past it).
Effects: fail.
utf8Valid
function utf8Valid(self: bytes, start: i64, end: i64): boolWhether bytes start..end of self are valid UTF-8 (RFC 3629), 32 bytes a step: three nibble lookups classify each byte against the one before (J. Keiser and D. Lemire, "Validating UTF-8 In Less Than One Instruction Per Byte", 2021); an ASCII block only carries the check of the block before.
Effects: fail.