class

Orc::RunLengthIntegerReaderV2

Inherits Iterator < Enumerable < Reference < Object

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.

Constants

MIN_REPEAT_SIZE = 3

Constructors

new(io : IO, signed : Bool = false)
Source

Instance methods

bytes_to_big_endian(bytes : Bytes, size : Int32) : Int64
Source
decode_width(encoded_width : UInt64)
Source
has_next?
Source
next

Returns the next element in this iterator, or Iterator::Stop::INSTANCE if there are no more elements.

Source
read
Source
read_direct(first_byte : UInt8)
Source
read_ints(offset, length, width)
Source
read_long_be(start, num_hops, num_bytes)
Source
read_long_be2(read_buffer : Bytes, offset)
Source
read_long_be8(read_buffer : Bytes, offset)
Source
read_remaining_longs(offset, remainder, num_bytes)
Source
read_short_repeat(first_byte : UInt8)
Source
unpack_rolled_bytes(offset, length, num_bytes)
Source
zigzag_decode(value : Int64)
Source

Nested types