StorageBytes.utf8.step: def of mylsm-lsm-store@0.6.0.1 Import: import mylsm-lsm-store@0.6.0.1/src/StorageBytes.bend as StorageBytes Lines 37-44 of mylsm-lsm-store@0.6.0.1/src/StorageBytes.bend: https://jend.leeeet.dev/read.txt?path=mylsm-lsm-store@0.6.0.1/src/StorageBytes.bend&start_line=37&end_line=44 import Base def utf8.step(state: Utf8State, +byte: U32) -> Utf8State: match state: case Utf8State{0, _, _, _, out, True{}}: utf8.lead(byte, out) case Utf8State{0, _, _, _, out, False{}}: Utf8State{0, 128, 191, 0, out, False{}} case Utf8State{need, lo, hi, cp, out, ok}: utf8.cont(need, cp, out, ok, U32.is_le(lo, byte) && U32.is_le(byte, hi), byte) Uses (9): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.is_le https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Word.Con https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Word.Nil https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/StorageBytes.bend&name=Utf8State https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/StorageBytes.bend&name=utf8.cont https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/StorageBytes.bend&name=utf8.lead