In this example, maximal range length is 4. Ranges are divided into layers of non-overlapping ranges. Two layers contain only ranges that can be encoded using Gray code and therefore are not shown. Containing range [4, 11] is encoded based on the BRGC values, which forms the first left four bits. Extra bits correspond to layers: Fifth bit to layer L1 and sixth bit to layer L3. If a range belongs to a layer, then the value of the bit corresponding to that layer is the binary value of the range for this layer. Otherwise, that bit is set to ‘*’. The total number of bits is proportional to the maximal encoded length and is independent of the number of encoded ranges