Esc

read_length

procedureextensionsince 0.36.1Source
  • macOS: read_length works on macOS
  • Linux: read_length works on Linux
  • Windows: read_length works on Windows
  • Wasm: read_length works on Wasm

Reads and checks a length before any slice or allocation. A one-byte length that fits stays inline; anything else, including every failure, takes read_long_length.

Signature

read_length :: (r: *Reader) -> s64

See also