I'm writing code that writes to an ID3v2 tag for an MP3 file. The tag
header contains 4 bytes that represents the total length of the tag.
It is stored as a 32-bit synchsafe integer. Definition of a 7-bit
synchsafe integer is:
Synchsafe integers are integers that keep its highest bit (bit 7)
zeroed, making seven bits out of eight available. Thus a 32 bit
synchsafe integer can store 28 bits of information.
Example:
255 (%11111111) encoded as a 16 bit synchsafe integer is 383
(%00000001 01111111).
What I need help with is how to convert a 32-bit integer to its 28-bit
equivelent. How would one go about doing this?
Thanks!