google / emboss

Emboss is a tool for generating code that reads and writes binary data structures.
Apache License 2.0
70 stars 21 forks source link

Support `bits` wider than 64 bits #40

Open reventlov opened 2 years ago

reventlov commented 2 years ago

NovAtel's RANGECMP (pp 842-844) record contains a 192-bit bitfield.

GPS subframes are defined as 300-bit sequences.

RTCM defines some wide bitfields which -- even more problematically -- contain 64-bit integers that are not aligned to byte boundaries.

Emboss should support bits of arbitrary size.

Note: the restriction that individual integers within those fields are no more than 64 bits is a separate feature that should be evaluated and implemented on its own.

AaronWebster commented 2 years ago

GMP might be worth looking into, using mpz_import and mpz_import to escrow data.