Sha256: 3353f6c245f16e5dbedd906c08c5e6958d9ec6d09c20c417faafc16718415fc7
Contents?: true
Size: 1.2 KB
Versions: 4
Compression:
Stored size: 1.2 KB
Contents
## String The String type is nearly identical to the Raw type from MessagePack but is specifically aimed at marking a set of bytes as text. ### Format Specification #### Symbol For storing symbol names as ASCII text up to (2^8)-1 bytes. Length is stored in unsigned 8-bit integer. ``` +--------+--------+---------- | 0xd4 |XXXXXXXX|...N bytes +--------+--------+---------- => XXXXXXXX (=N) bytes of raw bytes. ``` #### String16 For storing text up to (2^16)-1 bytes. Length is stored in unsigned 16-bit big-endian integer. Encoding is stored as an int8 ``` +--------+--------+--------+--------+---------- | 0xd8 |XXXXXXXX|XXXXXXXX|YYYYYYYY|...N bytes +--------+--------+--------+--------+---------- => XXXXXXXX_XXXXXXXX (=N) bytes of raw bytes. => YYYYYYYY encoding flag ``` #### String32 For storing text up to (2^32)-1 bytes. Length is stored in unsigned 32-bit big-endian integer. Encoding is stored as an int8 ``` +--------+--------+--------+--------+--------+--------+---------- | 0xd9 |XXXXXXXX|XXXXXXXX|XXXXXXXX|XXXXXXXX|YYYYYYYY|...N bytes +--------+--------+--------+--------+--------+--------+---------- => XXXXXXXX_XXXXXXXX_XXXXXXXX_XXXXXXXX (=N) bytes of raw bytes. => YYYYYYYY encoding flag ```
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
mochilo-1.2.1 | docs/format-spec.md |
mochilo-1.2 | docs/format-spec.md |
mochilo-1.1 | docs/format-spec.md |
mochilo-1.0 | docs/format-spec.md |