Skip to content

Compression Mode 06 — Inline Integer Encoding since v2.0.0

This compression mode is designed for very small non-negative integers and ensures that JSSC does not inflate the output in this specific case.

It is intended for use in databases, for example to store values like a "followers count". When the integer is greater than 14, JSSC falls back to compression mode 03.

How It Works

The integer value is stored directly in the Code #2 block of the Header Character.

Encoding Table

DecimalEncoded digitBinary
010001
120010
230011
340100
450101
560110
670111
781000
891001
9A1010
10B1011
11C1100
12D1101
13E1110
14F1111

Header Character Usage

NameUsage
Code #100 or 06
Code #2Encoded Integer
Code #3default
i?false
o?false
s?false
b?default