# Bytes that are not all zeros or ones are encoded as themselves.

encode
00000001
----
Size: 1
Binary encoding:
 80                                           |  .

encode
01101101
----
Size: 1
Binary encoding:
 b6                                           |  .

encode
101000101010100101000011111100101001001000010001
----
Size: 6
Binary encoding:
 4595c24f 4988                                |  E..O I.

encode
0000000100000001000000010000000100000001000000010000000100000001
0000000100000001000000010000000100000001000000010000000100000001
0000000100000001000000010000000100000001000000010000000100000001
0000000100000001000000010000000100000001000000010000000100000001
----
Size: 32
Binary encoding:
 80808080 80808080 80808080 80808080 80808080 |  .... .... .... .... ....
 80808080 80808080 80808080                   |  .... .... ....

# Bytes that are all ones get encoded as a 0xFF byte, followed by a varint
# encoded uint indicating the number of consecutive bytes like it.

encode
11111111
----
Size: 2
Binary encoding:
 ff01                                         |  ..

encode
1111111111111111
----
Size: 2
Binary encoding:
 ff02                                         |  ..

encode
1111111111
----
Size: 3
Binary encoding:
 ff0103                                       |  ...

encode
111111111111111111111111111111111111111111111111
----
Size: 2
Binary encoding:
 ff06                                         |  ..

encode
111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111
----
Size: 3
Binary encoding:
 ffa801                                       |  ...

# Bytes that are all zeros get encoded as a 0x00 byte, followed by a varint
# encoded uint indicating the number of consecutive bytes like it.

encode
00000000000000001111111111111111
----
Size: 4
Binary encoding:
 0002ff02                                     |  ....

encode
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000001111111111111111
----
Size: 5
Binary encoding:
 009601ff 02                                  |  .... .

encode
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000001
11100101000100100101
----
Size: 6
Binary encoding:
 005780a7 480a                                |  .W.. H.

encode
0000000000000000000000000000000000000000111111111111111111111111
1111111111111111111111111100000000000000000000000000000000000000
1111111111111111111111111111111111111111000000000000000000000000
1111111111111110000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
1111111111111111111111111111111111111111111111110000000000000000
----
Size: 18
Binary encoding:
 0005ff06 030004ff 050003ff 017f000e ff06     |  .... .... .... .... ..
