[][src]Module compressed_vec::nibblepacking

Structs

DeltaSink

A Sink which accumulates delta-encoded NibblePacked data back into increasing u64 numbers

DoubleXorSink

A sink which uses simple successive XOR encoding to decode a NibblePacked floating point stream encoded using pack_f64_xor: #method.pack_f64_xor

Functions

nibble_pack8

NibblePacking is an encoding technique for packing 8 u64's tightly into the same number of nibbles. It can be combined with a prediction algorithm to efficiency encode floats and long values. This is really an inner function; the intention is for the user to use one of the higher level pack* methods. Please see http://github.com/filodb/FiloDB/doc/compression.md for more answers.

nibble_unpack8

Unpacks 8 u64's packed using nibble_pack8 by calling the output.process() method 8 times, once for each encoded value. Always calls 8 times regardless of what is in the input, unless the input is too short. Returns "remainder" byteslice or unpacking error (say if one ran out of space). Uses the SIMD U32 unpack func if possible to speed things up

pack_f64_xor

Packs a stream of double-precision IEEE-754 / f64 numbers using XOR encoding. The first f64 is written as is; after that, each successive f64 is XORed with the previous one and the xor value is written, based on the premise that when changes are small so is the XORed value. Stream must have at least one value, otherwise InputTooShort is returned

pack_u64_delta

Packs a slice of u64 numbers that are increasing, using delta encoding. That is, the delta between successive elements is encoded, rather than the absolute numbers. The first number is encoded as is.

pack_u64

Packs a stream of plain u64 numbers using NibblePacking.

unpack

Unpacks num_values values from an encoded buffer, by calling nibble_unpack8 enough times. The output.process() method is called numValues times rounded up to the next multiple of 8. Returns "remainder" byteslice or unpacking error (say if one ran out of space)

unpack_f64_xor

Unpacks a buffer encoded with pack_f64_xor: #method.pack_f64_xor