-
Notifications
You must be signed in to change notification settings - Fork 1
Digram Serialization
To serialize several Digrams we simply add the serialized Digrams to each other.
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.
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
There are 33 different Digram structures The 6 bits represents them TODO add the list
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