Designed for flexibility.
Snarl uses a binary-based variable length encoding to represent characters, graphemes, or other elements of a message. In a standard English encoding table, the letters of the Latin alphabet are arranged in descending order of frequency in typical English text. Tables for other languages can be constructed with characters and frequency data from the language in question. As long as it's divisible into letter-like parts, any content can be encoded in this way — even pseudolanguages like IPA.
Once the characters have been sorted, each is assigned a binary
code. These codes appear to be simple binary numbers, but with one
major difference - leading zeroes are not implied. Thus, the codes 1
,
01
, and 001
are all different. This allows up to 30 characters to be
represented by codes 1-4 bits in length. With codes up to 5 bits, the
maximum rises to 62.
English Table | |
---|---|
A | 00 |
B | 0101 |
C | 101 |
D | 011 |
E | 0 |
F | 0001 |
G | 0010 |
H | 001 |
I | 10 |
J | 1000 |
K | 0111 |
L | 100 |
M | 111 |
N | 11 |
O | 01 |
P | 0100 |
Q | 1010 |
R | 010 |
S | 000 |
T | 1 |
U | 110 |
V | 0110 |
W | 0000 |
X | 1001 |
Y | 0011 |
Z | 1011 |
German Table | |
---|---|
A | 11 |
B | 0001 |
C | 101 |
D | 001 |
E | 0 |
F | 0011 |
G | 110 |
H | 010 |
I | 00 |
J | 1011 |
K | 0100 |
L | 100 |
M | 111 |
N | 1 |
O | 0000 |
P | 1000 |
Q | 1110 |
R | 10 |
S | 01 |
T | 000 |
U | 011 |
V | 0110 |
W | 0010 |
X | 1111 |
Y | 1101 |
Z | 0101 |
Ä | 1001 |
Ö | 1100 |
Ü | 0111 |
ß | 1010 |