constructor() {
    this.encoder = new Encoder();
    /**
     * @type {number}
     */

    this.s = 0;
    this.count = 0;
  }
Optimized Rle encoder that does not suffer from the mentioned problem of the basic Rle encoder.

Internally uses VarInt encoder to write unsigned integers. If the input occurs multiple times, we write
write it as a negative number. The UintOptRleDecoder then understands that it needs to read a count.

Encodes [1,2,3,3,3] as [1,2,-3,3] (once 1, once 2, three times 3)