Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add comments on compression #1119

Merged
merged 1 commit into from
Jul 26, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions fastfield_codecs/src/multilinearinterpol.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
/*!

MultiLinearInterpol compressor uses linear interpolation to guess a values and stores the offset, but in blocks of 512.

With a CHUNK_SIZE of 512 and 29 byte metadata per block, we get a overhead for metadata of 232 / 512 = 0,45 bits per element.
The additional space required per element in a block is the the maximum deviation of the linear interpolation estimation function.

E.g. if the maximum deviation of an element is 12, all elements cost 4bits.

Size per block:
Num Elements * Maximum Deviation from Interpolation + 29 Byte Metadata

*/

use crate::FastFieldCodecReader;
use crate::FastFieldCodecSerializer;
use crate::FastFieldDataAccess;
Expand Down