multistream.codec.transform

Logical codec which wraps another codec to transform the data before it is encoded or after it is decoded.

transform-codec

(transform-codec header & {:as opts})

Creates a new filter codec, identified by the given header.

Opts may include:

  • :encode-fn If provided, the function will transform values before they are encoded.
  • :decode-fn If provided, the function will transform values after they are decoded.