Open staltz opened 1 year ago
For more context go-ssb performs a check which ensures that the message JSON (by definition stored as Unicode text) is no longer than 8192 code points. This is theoretically different than measuring bytes.
JSON syntax describes a sequence of Unicode code points.
- ECMA 404 - The JSON Data Interchange Syntax https://www.ecma-international.org/wp-content/uploads/ECMA-404_2nd_edition_december_2017.pdf
Both measuring bytes and code points is valid but I don't know what was the original intention.
Measuring bytes theoretically requires another piece of knowledge: how the message is supposed to be encoded eg. UTF-8, UTF-16 etc so it is important to make that distinction. The JSON standard obviously doesn't define that but classic feed messages are encoded as UTF-16.
You're right
Context: https://github.com/ssbc/ssb-classic/pull/2