Hufint

De Lillois Fractale Wiki
Révision datée du 22 janvier 2014 à 07:02 par Pge (discussion | contributions) (Page créée avec « == Purpose == A Hufint is a variable-length-coded integer. The contract of this coding tool is: - allow to encode any positive integer (including 0) a a se of bit - allow... »)
(diff) ← Version précédente | Voir la version actuelle (diff) | Version suivante → (diff)
Aller à la navigation Aller à la recherche

Purpose

A Hufint is a variable-length-coded integer.

The contract of this coding tool is:

- allow to encode any positive integer (including 0) a a se of bit

- allow a non-ambiguous decoding algorithm

- use less bits for smaller integer

Hufint are used in the matscape projects, wherever

- integer values are likely to be small (example: number of child)

- integer values are allowed to be very large (but seldom)

- encoding size is critical

- speed for math operations on the values is not critical

Hufint base

The Hufint base is the slice size for the hufint bitset representation.

Matscape uses Hufint-6 representations, and

- number from 0 to 31 are represented on 6 bits