def chunk.size.of
import emerging-ezhttp@0.21.0.0/src/http.bend as Httpimport Base
296# a chunk-size line once it is known whether its size is hex
297def chunk.size.of(+before: String, ok: Bool) -> Size:
298 match ok:
299 case False{}:
300 SizeBad{"chunk size is not hexadecimal"}
301 case True{}:
302 +n = hexlen(before)
303 chunk.size.n(n, Nat.is_eq(n, 0n))