def utf8.put.four
mylsm-lsm-store@0.6.0.1 · src/StorageBytes.bend:154
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
154def utf8.put.four(cursor: Bytes.Cursor, +scalar: U32) -> Bytes.Cursor:
155 utf8.put.byte(utf8.put.byte(
156 utf8.put.byte(utf8.put.byte(cursor, (240 + U32.shrn(scalar, 18n) : U32)),
157 (128 + U32.and(U32.shrn(scalar, 12n), 63) : U32)),
158 (128 + U32.and(U32.shrn(scalar, 6n), 63) : U32)),
159 (128 + U32.and(scalar, 63) : U32))