Package org.rcsb.cif.binary.codec
Class RunLengthCodec
- java.lang.Object
-
- org.rcsb.cif.binary.codec.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]
-
-
Constructor Summary
Constructors Constructor Description RunLengthCodec()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IntArraydecode(Int32Array data, RunLengthEncoding encoding)Int32Arrayencode(IntArray data, RunLengthEncoding encoding)
-
-
-
Method Detail
-
encode
public Int32Array encode(IntArray data, RunLengthEncoding encoding)
-
decode
public IntArray decode(Int32Array data, RunLengthEncoding encoding)
-
-