Test cases:

running case random 50 serialized: 182, encoded: 94 (51.648%)
running case random 100 serialized: 366, encoded: 187 (51.093%)
running case random 500 serialized: 1828, encoded: 935 (51.149%)
running case random 1000 serialized: 3633, encoded: 1856 (51.087%)

running case one digit 50 serialized: 99, encoded: 50 (50.505%)
running case one digit 100 serialized: 199, encoded: 100 (50.251%)
running case one digit 500 serialized: 999, encoded: 500 (50.050%)
running case one digit 1000 serialized: 1999, encoded: 1000 (50.025%)

running case two digits 50 serialized: 149, encoded: 85 (57.047%)
running case two digits 100 serialized: 299, encoded: 177 (59.197%)
running case two digits 500 serialized: 1499, encoded: 859 (57.305%)
running case two digits 1000 serialized: 2999, encoded: 1727 (57.586%)

running case three digits 50 serialized: 199, encoded: 99 (49.749%)
running case three digits 100 serialized: 399, encoded: 199 (49.875%)
running case three digits 500 serialized: 1999, encoded: 989 (49.475%)
running case three digits 1000 serialized: 3999, encoded: 1974 (49.362%)

running case all numbers 3 times serialized: 3275, encoded: 1683 (51.389%)