def utf8.put.three

mylsm-lsm-store@0.6.0.1 · src/StorageBytes.bend:148

import mylsm-lsm-store@0.6.0.1/src/StorageBytes.bend as StorageBytes
import Base
import bend-kit-bytes@0.3.2.0/bytes.bend as Bytes

148def utf8.put.three(cursor: Bytes.Cursor, +scalar: U32) -> Bytes.Cursor:
149  utf8.put.byte(utf8.put.byte(
150    utf8.put.byte(cursor, (224 + U32.shrn(scalar, 12n) : U32)),
151    (128 + U32.and(U32.shrn(scalar, 6n), 63) : U32)),
152    (128 + U32.and(scalar, 63) : U32))

Uses (6)

Used by (1)