class Orc::RunLengthByteReader
- Orc::RunLengthByteReader
- Reference
- Object
Overview
The first byte of each group of values is a header that determines whether it is a run (value between 0 to 127) or literal list (value between -128 to -1). For runs, the control byte is the length of the run minus the length of the minimal run (3) and the control byte for literal lists is the negative length of the list. For example, a hundred 0’s is encoded as [0x61, 0x00] and the sequence 0x44, 0x45 would be encoded as [0xfe, 0x44, 0x45]. The next group can choose either of the encodings.
Included Modules
- Iterator(UInt8)
Defined in:
orc/run_length_byte_reader.crConstant Summary
-
MAX_LITERAL_SIZE =
128
-
MIN_REPEAT_SIZE =
3
Constructors
Instance Method Summary
- #has_next?
-
#next
Returns the next element in this iterator, or
Iterator::Stop::INSTANCE
if there are no more elements. - #read
Constructor Detail
Instance Method Detail
def next
#
Description copied from module Iterator(UInt8)
Returns the next element in this iterator, or Iterator::Stop::INSTANCE
if there
are no more elements.