def ch.ok
import bend-kit-zlib@0.5.1.0/zlib.bend as Zlibimport Base
893# RFC 1951 §3.2.5: a distance is at most 32768.
894def ch.ok(+i: U32, +c: U32, +max: U32, +blen: U32) -> Bool:
895 Bool.and(Bool.and(U32.is_lt(0, c), U32.is_lt((i - c : U32), 32768)), U32.is_lt(blen, max))