Reading Binary Data with Style: A Serialization Framework for C++17
summary
Experimental header-only C++17 library blobify converts user structs to compact binary blobs and back, automating construction (including non-trivial constructors) and validation via an embedded DSL called properties. It uses reflection helpers magic_get and magic_enum, stack-reads sizeof(T) bytes into an internal buffer, handles nested structs and endianness conversion, throws specific validation exceptions (unexpected value) on mismatches, and explicitly does not support C bitfields yet. Library is on GitHub, works today but remains experimental.
AI-written summary · about
chapters (26)
- 0:00Intro
- 0:18Who am I
- 1:30Disclaimer
- 2:23The Problem
- 6:00Non Solutions
- 15:55Python Construct
- 18:10Blobby
- 18:30Goals
- 20:11Preparation
- 20:45Coding
- 22:15BMP header
- 23:05Loading multiple elements
- 24:10What does the blob function do
- 28:00Properties
- 29:10Magic Constant Problem
- 34:40Regular Expressions
- 35:55Validate Enum
- 39:35Blobstore API
- 40:20Randomizing Binary Data
- 41:00How does it work
- 41:35Magic Add
- 45:25No runtime checks
- 47:15MetaGenome
- 48:00Future plans
- 51:15Conclusion
- 52:05Questions
related talks
54mWriting C++ to Be Read
01h 28mModern C++ Design reloaded
01h 16mPolymorphism, Cohesion, and Coupling in C++
01h 07mDesign Patterns in Modern C++
44mMake Classes Great Again! (Using Concepts for Customization Points)
01h 39mBetter Code: Relationships
01h 13mPractical Production-Proven Constexpr API Elements
51mTechniques for Wielding Data and Behaviors
