class Orc::RunLengthIntegerReaderV2

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

Defined in:

orc/run_length_integer_reader_v2.cr

Constant Summary

MIN_REPEAT_SIZE = 3

Constructors

Instance Method Summary

Constructor Detail

def self.new(io : IO, signed : Bool = false) #

[View source]

Instance Method Detail

def bytes_to_big_endian(bytes : Bytes, size : Int32) : Int64 #

[View source]
def decode_width(encoded_width : UInt64) #

[View source]
def has_next? #

[View source]
def next #
Description copied from module Iterator(Int64)

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


[View source]
def read #

[View source]
def read_direct(first_byte : UInt8) #

[View source]
def read_ints(offset, length, width) #

[View source]
def read_long_be(start, num_hops, num_bytes) #

[View source]
def read_long_be2(read_buffer : Bytes, offset) #

[View source]
def read_long_be8(read_buffer : Bytes, offset) #

[View source]
def read_remaining_longs(offset, remainder, num_bytes) #

[View source]
def read_short_repeat(first_byte : UInt8) #

[View source]
def unpack_rolled_bytes(offset, length, num_bytes) #

[View source]
def zigzag_decode(value : Int64) #

[View source]