def ce.io.deflate

bend-kit-http@0.38.2.0 · http.bend:4165

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

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

Uses (7)

Used by (1)