Class RunLengthCodec


  • public class RunLengthCodec
    extends Object

    Represents each integer value in the input as a pair of (value, number of repeats) and stores the result sequentially as Int32Array. Additionally, stores the size of the original array to make decoding easier.

     RunLength {
         kind = "RunLength"
         srcType: int[]
         srcSize: number
     }
     Example
     [1, 1, 1, 2, 3, 3]
     ---RunLength--->
     { srcSize = 6 } [1, 3, 2, 1, 3, 2]