Why it matters

Binary protocols need type-safety. scodec is Scala FP standard.

Advertisement

The architecture

Codec[A]: encode/decode A ↔ bits.

Composable combinators.

scodec designCodec[A]bits ↔ valueCombinatorscompose codecsBitVectorefficient bit manipulationType-safe binary avoids offset + byte-order bugs
scodec structure.
Advertisement

How it works end to end

Compose: ~ for products, |*| for coproducts.

BitVector: efficient bit representation.

Applications: protocols, file formats, network packets.