this is like the nostrdb binary note format but a bit more space efficient and network friendly. great for transferring notes over the wire. An 74kb contact list crunches to about 37kb. About half the size!
sizes of strings are varint encoded, but it gets better. The first bit in the encoded varint size is used to signify that it is a binary string.
It will detect any hex strings and encode them as binary and encode this hint in the size byte. You can encode the type (string/binary) and length up to 126 in a single byte (aka most things in tags).
This means large contact lists are efficiently compressed: 1 byte for length + type and 32 bytes for pubkeys in tags.
nostr:note1m9uh77q0xfavvxz40nhufrmn9n6298hs4tlzzlhuh2flw5nv3afqwqv6ra