PHP Binary Compressor

Upload a binary file. Click "Start compression" to download the compressed file named [input]_comp.bin.

Rules summary (enforced):
  1. Zero values (highest): E0..FE => 2..32 zeros. If there are 2 or more contiguous 0x00 bytes at the current position, they are ALWAYS encoded with zero-values.
  2. LZ compression (second): xx zz (min length = 2). Read-length page derived from the match's start (source) position.
  3. RLE (third): C0..DF => repeat next byte (2..33)
  4. Word converter (lowest): A0..BF converts 00 X 00 Y ... into X Y ... (min 2 pairs; only when converted bytes not all zero)
  5. Header: first two bytes = total output filesize (including header) in little-endian