Compression Mode 02 — Two-Byte CharCode Concatenation since v1.0.0
This compression mode operates on the binary representation of character codes.
It concatenates pairs of two-byte (8 bits) codes into a four-byte (16 bits) binary character code.
How It Works
Step-by-Step Walkthrough
Input: Hello!
000000000100100000000000011001010000000001101100000000000110110000000000011011110000000000100001
- Chunkify:
He,ll,o! - Convert to binary character codes:
1001000and1100101,1101100and1101100,1101111and100001 - Concatenate binary character code pairs as strings:
0100100001100101,0110110001101100,0110111100100001 - Convert to UTF-16 characters:
䡥,汬,漡
Output: 䡥汬漡
010010000110010101101100011011000110111100100001