Encoding rules for compressed packet types

bit definition (lowest bit → high bit) Binary bits Compression type
00000001 (bit0) .7z
00000010 (bit1) .zip
00000100 (bit2) .tar
00001000 (bit3) .gz
00010000 (bit4) .xz
Parsing rules

highest bit (leftmost bit) decision

extension generation

Notes: A single type mandates that the most significant bit must be 0 when there is only one compression type (for example. 7z can only be represented as 00000001, not 10000001) .

example illustration

Binary value The highest bit Analytical direction The order of the extensions The final extension
10001100 1 right→left .tar → .gz .tar.gz
00001100 0 left→right .gz → .tar .gz.tar
00000001 0 left→right .7z .7z
00101000 0 left→right .gz → .xz .gz.xz
10100001 1 right→left .7z → .xz .7z.xz

Key points