Skip to content

Commit

Permalink
Add explanation of integer key usage
Browse files Browse the repository at this point in the history
Currently, we consistently use integer keys in our object
definitions, with the human readable field name appended as a comment.
This unusual syntax has significant memory benefits for us, but could
use an explanation for people not familiar with this design.
  • Loading branch information
baylesj committed Apr 8, 2019
1 parent d7e8ae1 commit fc0788a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion index.bs
Expand Up @@ -1514,7 +1514,12 @@ Appendix A: Messages {#appendix-a}

The following messages are defined with [[CDDL]]. When
integer keys are used, a comment is appended to the line to indicate
the name of the field. Each root message (one that can be put into a
the name of the field. This unusual syntax is consistently applied for object
definitions in this specification due to it resulting in significantly smaller
objects over-the-wire. Integer keys are used instead of object arrays to allow
for easy indexing of optional fields.

Each root message (one that can be put into a
QUIC stream without being enclosed by another message) has a comment
indicating the message type key.

Expand Down

0 comments on commit fc0788a

Please sign in to comment.