def ce.io.deflate

bend-kit-http@0.38.5.0 · http.bend:4169

import bend-kit-http@0.38.5.0/http.bend as Http
import Base
import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes

4169# ponytail: deflate runs on the pure decoder, which also takes raw DEFLATE; servers rarely send it.
4170def ce.io.deflate(on: Bool, b: Bytes.Bytes) -> IO(Maybe<&1, Bytes.Bytes>):
4171  match on:
4172    case True{}:
4173      IO.pure(Maybe<&1, Bytes.Bytes>, ce.dec(ce.deflate(b)))
4174    case False{}:
4175      IO.pure(Maybe<&1, Bytes.Bytes>, Some{b})

Uses (7)

Used by (1)