def byte_count

mylsm-lsm-store@0.6.0.1 · src/hub_sha/core.bend:3412

import mylsm-lsm-store@0.6.0.1/src/hub_sha/core.bend as Core
import Base

3412# Handle byte lengths for count for the SHA-256 compression implementation.
3413def byte_count(bytes: List<&2, U32>, acc: Nat) -> Nat:
3414  match bytes:
3415    case Nil{}:
3416      acc
3417    case h <> t:
3418      byte_count(t, 1n+acc)

Uses (3)

Used by (1)