Sha256.stream.compress: def of mylsm-lsm-store@0.6.0.1 Import: import mylsm-lsm-store@0.6.0.1/src/hub_sha/sha256.bend as Sha256 Lines 257-263 of mylsm-lsm-store@0.6.0.1/src/hub_sha/sha256.bend: https://jend.leeeet.dev/read.txt?path=mylsm-lsm-store@0.6.0.1/src/hub_sha/sha256.bend&start_line=257&end_line=263 import Base import mylsm-lsm-store@0.6.0.1/src/hub_sha/state.bend as S import bend-kit-bytes@0.3.2.0/bytes.bend as Packed def stream.compress(bytes: Packed.Bytes, compressed: S.State) -> S.State: match bytes: case Packed.Bytes{+len, buf}: stream.count(packed.blocks( Nat.mul(Nat.div(U32.to_nat(len), 64n), 16n), 16n, Packed.Cursor.u32be(Packed.Cursor.new(Packed.Bytes{len, buf})), Nil{}, compressed)) Uses (10): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.div https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.mul https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.to_nat https://jend.leeeet.dev/definition.txt?path=bend-kit-bytes@0.3.3.0/bytes.bend&name=Bytes https://jend.leeeet.dev/definition.txt?path=bend-kit-bytes@0.3.3.0/bytes.bend&name=Cursor.new https://jend.leeeet.dev/definition.txt?path=bend-kit-bytes@0.3.3.0/bytes.bend&name=Cursor.u32be https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/hub_sha/sha256.bend&name=packed.blocks https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/hub_sha/sha256.bend&name=stream.count https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/hub_sha/state.bend&name=State