I\'m trying to take 21 bytes of data which uniquely identifies a trade and store it in a 16 byte char
array. I\'m having trouble coming up with the right algor
You can do this in ~~15bytes (14 bytes and 6 bits).
For each character from trace_num_
you can save 1 bit if you want save ascii in 7 bits.
Let get number information, each char can be one from ten values (0 to 9). Then you must have 4 bits to save this character, to save number you must have 1 byte and 4 bits, then you save half of this.
If you want to use only qwertyuioplkjhgfdsazxcvbnmQWERTYUIOPLKJHGFDSAZXCVBNM1234567890[]
You can save each char in 6 bits. Then you have next 2 bytes and 2 bits.
And if you save your number in integer on 10 bytes. You can fit this into 14 bytes and 6 bits.