-- Leo's gemini proxy

-- Connecting to iceworks.cc:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini

Elias delta coding

Created: 2023-06-20T01:14:15-05:00

Return to the Index

This card pertains to a resource available on the internet.


Uses floor(log2(x)) + 2*floor(log2(floor(log2(x))+1))+1 bits to store an integer.

Does not encode zeroes or negative numbers. You need ZigZag encoding for that.


Encoding

Find the highest power of two in X as floor(log2(x)), assign as N

Encode N+1 with Gamma encoding

Append remaining N bits


Decoding

Decode Gamma encoded integer, assign to N.

Read N-1 remaining bits.

Add 2^(N-1) and the remaining bits together.


Elias Gamma Encoding


-- Response ended

-- Page fetched on Fri Jun 7 07:13:07 2024