Skip to content

Digram Serialization

F. Conrads edited this page Sep 17, 2019 · 27 revisions

digram-ser.png

To serialize several Digrams we simply add the serialized Digrams to each other.

Complement of Edge Label Index 1

To set the start of a digram, we simply use the complement of the first edge label index. Hence to seperate two digrams, we can search for the next Integer with the leading bit. This is then the next ELI1 and the start of the next digram, thus setting the boundaries of the internals.

Size Flag

The size flag represents the Number Class of the internals, if the internals are all smaller than the Maximum amount possible using a short, it would be a waste of space to save them as Integers. So the internals will be saved in the lowest number class all of them can be contained in.

  • 00 for byte
  • 01 for short
  • 10 for integer
  • 11 for long

Struct

There are 33 different Digram structures The 6 bits represents them TODO add the list

compression rate

In the following graph the compression ratio of this method in comparison to saving each Digram Occurences naively as a 24 byte object (N1 E1 N2 N3 E2 N4) is shown: this_approach/naive

digram-ratio.png

Clone this wiki locally