4 ms·
Are there any examples? If it's ASCII I'd expect to see some of the actual data in the readme, not just API. Unless, to read that correctly, it only has a text
by rendaw 7mo ago
Are there any examples? If it's ASCII I'd expect to see some of the actual data in the readme, not just API.
Unless, to read that correctly, it only has a text encoding as long as you can guarantee you don't have any unicode?
- creationix 7mo agooh, sorry about that. I forgot to include the description of the format with examples. I did add some small examples to the repo. https://github.com/creationix/rx/blob/main/samples/quest-log.rx https://github.com/creationix/rx/blob/main/samples/quest-log... The older, slightly outdated, design spec is in the older rex repo (this format was spun out of the rex project when I realized it's actually a good standalone format) https://github.com/creationix/rex/blob/main/rexc-bytecode.md https://github.com/creationix/rex/blob/main/rexc-bytecode.md
- SV_BubbleTime 7mo ago'fdiscovered,aextreme,7danger,6+1A+16;6level_range,b:QThe Heap ,d'th Oof.
- dontdoxxme 7mo agoVery similar to bittorrent’s bencode. That has the benefit that it has a canonical encoding which this doesn’t (because of the different compression options). I wouldn’t be put off by how it looks as text.
- creationix 7mo agoVery true. I had forgotten about bencode, I should read up on that again. It makes sense they need a canonical form because they want same values to have same content hashes.
- creationix 7mo ago> it only has a text encoding as long as you can guarantee you don't have any unicode? The format is technically a binary format in that length prefixes are counts of bytes. But in practice it is a textual format since you can almost always copy-paste RX values from logs to chat messages to web forms without breaking it. unciode doesn't break anything since strings are encoded as raw unicode with utf-8 byte length prefixes. It supports unicode perfectly. If your data only contains 7-bit ASCII strings, the entire encoding is ASCII. If your data contains unicode, RX won't escape it, so the final encoding will contain unicode as UTF-8.