-
Notifications
You must be signed in to change notification settings - Fork 30
Ideas to make the serialization format easier to understand. #12
Description
Here are some ideas to make the serialization format easier to understand.
While I don't have a need for the library at the current time, I was interested in understanding how this serialization format worked.
But the spec is fairly abstract.
Since, I've been playing with Google Antigravity lately to find where it is useful, I decided to throw it at the project to see if it could produce the doc I want, and with many iterations produced what I wanted:
- Explain every bytes of the first example first output
- Display the B-tree structure using MermaidJS
I reviewed every byte for example 1 and I'm reasonably confident that the explanation is correct.
To understand how b-tree split and all data types worked, so made Antigravity generate a new example and explain its output:
- examples/buffer_api/08-comprehensive-features.c: new example "RPG" character with many stats, inventory, ... demonstrating homogeneous and mixed type arrays.
- byte by byte explanation of example 8
- B-tree visualization of example 8 output
WARNING: I didn't check every 1900 bytes of the explanation. But I checked a few parts which seems okay. Helped me understand splitting, and how nested object/array where handled.
I believe Antigravity was using the following Python script hexdump_to_doc_skeleton.py to write example 8 explanation.