Skip to content

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!

00000000010010000000000001100101
00000000011011000000000001101100
00000000011011110000000000100001

  1. Chunkify: He, ll, o!
  2. Convert to binary character codes: 1001000 and 1100101, 1101100 and 1101100, 1101111 and 100001
  3. Concatenate binary character code pairs as strings: 0100100001100101, 0110110001101100, 0110111100100001
  4. Convert to UTF-16 characters: , ,

Output: 䡥汬漡

010010000110010101101100011011000110111100100001