Package io.keikai.doc.collab.lib0
Class UintOptRleEncoder
- java.lang.Object
-
- io.keikai.doc.collab.lib0.UintOptRleEncoder
-
public class UintOptRleEncoder extends java.lang.ObjectOptimized 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 Summary
Constructors Constructor Description UintOptRleEncoder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Uint8ArraytoUint8Array()voidwrite(int v)
-
-
-
Method Detail
-
write
public void write(int v)
-
toUint8Array
public Uint8Array toUint8Array()
-
-