1. Binary Contexts
    1. bin
    2. compression
    3. encryption
    4. base64

Binary Contexts

Provide a container for binary data. Substructs are rebased within this context such that addressing $00000000:b refers to the top of the contained binary data and not the top of the root file.

Binary contexts must implement the following keys:

As a note, the reason for having compression and encryption types instead of a type for each algorithm is to allow for more complex naming which may include such things as hyphens or what have you.

bin

The basic binary context.

bin must implement the following additional keys:

When stringified, it should return a hexadecimal loadout such that every byte is represented by two characters. There should be 16 bytes per line and each byte should be separated by a space, except for the 8th and 9th bytes on the line which should be separated by two spaces. These lines should be separated by newlines and a comment containing the ASCII representation (with non-printing characters changed to periods) with a space between the 8th and 9th characters of the line should offered to the text context. Stringification to RPL example:

`0a 0b 0c 0d 0e 0f 10 11  12 13 14 15 16 17 18 19` # ........ ........
`1a 1b 1c 1d 1e 1f 20 21  22 23 24 25 26 27 28 29` # ...... ! "#%&\'()
`2a 2b 2c 2d 2e 2f 30 31  32 33 34 35 36 37 38 39` # *+,-./01 23456789
`3a 3b 3c 3d 3e 3f 40 41  42 43 44 45 46 47 48 49` # :;<=>?@A BCDEFGHI
`4a 4b 4c 4d 4e 4f 50 51  52 53 54`                # JKLMNOPQ RST

or possibly in the form such that every two bytes are clustered together, like this:

`0a0b 0c0d 0e0f 1011  1213 1415 1617 1819` # ........ ........
`1a1b 1c1d 1e1f 2021  2223 2425 2627 2829` # ...... ! "#%&\'()
`2a2b 2c2d 2e2f 3031  3233 3435 3637 3839` # *+,-./01 23456789
`3a3b 3c3d 3e3f 4041  4243 4445 4647 4849` # :;<=>?@A BCDEFGHI
`4a4b 4c4d 4e4f 5051  5253 54`             # JKLMNOPQ RST

HTML example:

<div class="rpl-bin">
	<pre class="rpl-bin-line">0a0b 0c0d 0e0f 1011  1213 1415 1617 1819</pre> <!-- ........ ........ -->
	<pre class="rpl-bin-line">1a1b 1c1d 1e1f 2021  2223 2425 2627 2829</pre> <!-- ...... ! "#%&\'() -->
	<pre class="rpl-bin-line">2a2b 2c2d 2e2f 3031  3233 3435 3637 3839</pre> <!-- *+,-./01 23456789 -->
	<pre class="rpl-bin-line">3a3b 3c3d 3e3f 4041  4243 4445 4647 4849</pre> <!-- :;<=>?@A BCDEFGHI -->
	<pre class="rpl-bin-line">4a4b 4c4d 4e4f 5051  5253 54</pre>             <!-- JKLMNOPQ RST -->
</div>

Clustering, comments, and trailing comma (when unnecessary) may be pretty printing options.

When parsing, it should accept a string of multiple 2-character hexadecimal numbers representing bytes, ignoring spaces.

compression

Deals with compressed data. Decompresses when unserializing and compresses when serializing. Decompressing from the target binary can generally work by decompressing until it stops.

compression must implement the following additional keys:

Additional algorithms should be able to be registered by libraries.

encryption

Deals with encrypted data. Decrypts when unserializing and encrypts when serializing.

encryption must implement the following additional keys:

Additional algorithms should be able to be registered by libraries.

base64

Encode or decode a base64 block. Decodes when parsing and encodes when stringifying.

base64 must implement the following additional keys: