Skip to content

std.binary

Generated by sema doc from crates/sema-runtime/assets/stdlib/sema/binary.sema. Import with from std.binary import …. For a narrative introduction see std.binary.

Bounded, digest-verified binary array decoding.

def decode_bytes(payload: str, expected_sha256: str, max_items: int) -> list[int] !{}

Parameters

name type
payload str
expected_sha256 str
max_items int

Returns list[int]

Effects !{}

def decode_u16_le(payload: str, expected_sha256: str, max_items: int) -> list[int] !{}

Parameters

name type
payload str
expected_sha256 str
max_items int

Returns list[int]

Effects !{}

def decode_f32_le(payload: str, expected_sha256: str, max_items: int) -> list[f64] !{}

Parameters

name type
payload str
expected_sha256 str
max_items int

Returns list[f64]

Effects !{}