SstFile.next_chunk: def of mylsm-lsm-store@0.6.0.1 Import: import mylsm-lsm-store@0.6.0.1/src/SstFile.bend as SstFile Lines 529-539 of mylsm-lsm-store@0.6.0.1/src/SstFile.bend: https://jend.leeeet.dev/read.txt?path=mylsm-lsm-store@0.6.0.1/src/SstFile.bend&start_line=529&end_line=539 import Base import bend-kit-bytes@0.3.2.0/bytes.bend as Bytes # Yield the next serialized part and advance encoder state. def next_chunk(encoder: Encoder) -> Encoder & Maybe<&1, Bytes.Bytes>: match encoder: case Enc{Header{}, chunks, +level, +total, +block_count, footer}: (Enc{Blocks{}, chunks, level, total, block_count, footer}, Some{header_bytes(level, total, block_count)}) case Enc{Blocks{}, Nil{}, level, total, block_count, footer}: (Enc{Finished{}, Nil{}, level, total, block_count, Bytes.new(0)}, Some{footer}) case Enc{Blocks{}, Con{bytes, rest}, level, total, block_count, footer}: (Enc{Blocks{}, rest, level, total, block_count, footer}, Some{bytes}) case Enc{Finished{}, chunks, level, total, block_count, footer}: (Enc{Finished{}, chunks, level, total, block_count, footer}, None{}) Uses (9): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Sigma 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=new https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/SstFile.bend&name=Encoder https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/SstFile.bend&name=Phase https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/SstFile.bend&name=header_bytes