Skip to content
/ SHICHIRO Public

An XML-based linear binary coding for integers

Notifications You must be signed in to change notification settings

H1K0/SHICHIRO

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

SHICHIRO encoding

Shichiro is kinda XML-based linear binary encoding for integers developed by me. More optimized and flexible modification of NANAKO encoding.

How it works

Shichiro is a Japanese male name that contains Japanese word 七 (nana or shichi) which means "seven".

Firstly, we translate the number into binary and count its length in binary digits or bits. If the length is less than 128, it is being encoded straightly as one byte (e.g. 10 => 00001010). Otherwise, it is being encoded using NANAKO encoding (e.g. 192 => 11100000 00000000 00000001).

Finally, we just write the binary representation of the number bitwisely (NOT bytewisely!).

Examples:

  • 1089 => 00001011 10001000001
  • 2^126 + 1 => 01111111 1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
  • 2^127 + 1 => 11000000 00000000 00000001 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001

Releases

No releases published

Packages

No packages published

Languages