Bytes.inflate.distance.extra: def of gralha-bytes@0.1.0.1 Import: import gralha-bytes@0.1.0.1/bytes.bend as Bytes Lines 233-238 of gralha-bytes@0.1.0.1/bytes.bend: https://jend.leeeet.dev/read.txt?path=gralha-bytes@0.1.0.1/bytes.bend&start_line=233&end_line=238 import Base import gralha-text-scan@0.1.0.1/scan.bend as U def inflate.distance.extra(read: BitRead, +length: U32, +base: U32, +out: Bytes, limit: U32) -> Inflate: BitRead{extra, stream} = read +input = stream +distance = (base + extra : U32) U.branch(Inflate, bits.valid(input) && U32.is_gt(distance, 0) && U32.is_le(distance, bytes.size(out)) && U32.is_le(length, (limit - bytes.size(out) : U32)), _ => Inflate{input, inflate.copy(U32.to_nat(length), distance, out)}, _ => Inflate{bits.invalid(input), out}) Uses (15): 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.add https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.is_gt 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=U32.sub https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.to_nat https://jend.leeeet.dev/definition.txt?path=gralha-bytes@0.1.0.1/bytes.bend&name=BitRead https://jend.leeeet.dev/definition.txt?path=gralha-bytes@0.1.0.1/bytes.bend&name=Bytes https://jend.leeeet.dev/definition.txt?path=gralha-bytes@0.1.0.1/bytes.bend&name=Inflate https://jend.leeeet.dev/definition.txt?path=gralha-bytes@0.1.0.1/bytes.bend&name=bits.invalid https://jend.leeeet.dev/definition.txt?path=gralha-bytes@0.1.0.1/bytes.bend&name=bits.valid https://jend.leeeet.dev/definition.txt?path=gralha-bytes@0.1.0.1/bytes.bend&name=bytes.size https://jend.leeeet.dev/definition.txt?path=gralha-bytes@0.1.0.1/bytes.bend&name=inflate.copy https://jend.leeeet.dev/definition.txt?path=gralha-text-scan@0.1.0.1/scan.bend&name=branch