Class UintOptRleEncoder


  • public class UintOptRleEncoder
    extends java.lang.Object
    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 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)
    • Constructor Detail

      • UintOptRleEncoder

        public UintOptRleEncoder()
    • Method Detail

      • write

        public void write​(int v)