-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possible IETF (RFC) standardization document #8
Comments
Sure thing. Standardization is always good :) |
what/how would base64 represent ? |
It would represent any binary blob of data. The difference between this an other base64 representations are:
BTW, you may also want to encourage adoption of the safe85 spec, since it's also safe for all modern text formats, and encodes data to a smaller size. They may also find some inspiration from https://github.com/kstenerud/concise-encoding/blob/master/cte-specification.md |
many of the differences you list are not differences; they are notable points I suppose. so your order is '-', '0-9', 'A-F', '_', 'a-f' ... so something that no other base64 encoder resembles. and ascii85 puts all symbols at the end , which defeats same-sort-order ... I was going to mention my decoder supports all the combinations of these...
But then none of that really applies; since the whole map would have to change. Safe85... (weak argument, just something i leveraged) Base64 character pairs can be used in a lookup table of 4096 entries; which is a nice roundnumber... but can be used directly for a wide hash index. I don't see how you can fit 'whispace anywhere' with 'no padding' .. I suppose you're embedding it in a string? So, I wouldn't know if it was a string or binary? |
If you have delimiters already, you don't need padding. If there are no delimiters, you need the length prefix variant (which guarantees truncation detection, something padding can't do). Anything higher than base64 will require more processing power due to the math. But then again, once you get to high enough throughput requirements, you'd be better off going for a binary format like https://github.com/kstenerud/concise-encoding/blob/master/cbe-specification.md which doesn't need any of this trickery. It comes down to how much weight is given to human readableness on the wire vs processing cost vs bandwidth cost. Everything is a compromise. |
re CBE; that puts a lot of magic numbers into the encoding and you might as well use like protobufs, or BSON :) |
Magic numbers are important; that's how you differentiate the data types efficiently. Protobufs solves a different problem than BSON/JSON/CBE. It doesn't include type data in the encoding, which means that you can only decode if you have an exact copy of the schema. And BSON is too bulky and wasteful, unfortunately. The UTF-8 codepoint based encodings are designed to get around the twitter character-length limitation. They're not actually smaller. They can't get more efficient in byte length than the byte-oriented encodings like base64 and 85 and 90. |
https://github.com/json5/json5 is currently proposing to add base64 support for JSON's superset.
They would like to develop an RFC, and I would like to discuss with them about safe encoding.
Is it possible to have an RFC proposal to accompany this repo? Or is that unnecessary?
json5/json5#190
The text was updated successfully, but these errors were encountered: