Practical Binary with Scodec
summary
Scodec uses Shapeless to derive binary encoders and decoders from Scala types, generating derived codecs for case classes and sealed traits via HLists, Coproducts, records and unions; codecs are first-class Encoder/Decoder effects that can fail with rich path-aware error messages pointing to the exact field, and allow explicit formats like an unsigned 13‑bit PID or tagged unions; library includes BitVector, composes codecs, auto-derives sealed‑hierarchy codecs, and achieves real workloads (≈20 Mbps on laptops) often matching or beating hand‑coded solutions.
AI-written summary · about
chapters (7)
- 0:00Introduction to scodec
- 2:16Library architecture
- 3:32Basic usage and shapeless
- 13:40Working with Hlists
- 23:31Co-products and unions
- 38:29Advanced generic derivation
- 49:12Q&A and performance
related talks
46mCodecs and Funny Looking Functors
36mFrom Scala to ByteCode...
50mBetter, faster, stronger Coder. Improving data processing @Spotify
24mLet the Scala compiler work for you
23mCASE STUDY FOR A REAL-WORLD TYPE-LEVEL PROGRAMMING
34mSystematic Software with Scala
49mRoll Your Own Shapeless
01h 05mScala: The Simple Parts
