[ID3 Dev] synchsafe integers
Jim
jmartin_92 at verizon.net
Sat Sep 13 01:24:38 PDT 2008
Daniel Wechsler wrote:
> Hello out there, I'm new here!
>
> My question concerns the synchsafe integers, which were used for saving
> the tag- and framesize.
> Bit 7 must always be 0, so 1111 1111 becomes 0000 0001 0111 1111.
>
> But what is if bit 7 is already 0? Do I have to add a 0, too? [0000
> 0001 0111 1111 -> 0000 0010 0111 1111]
> Or stays it like it is?
>
> (I'm sorry for my bad english, I'm from Germany^^)
> Thank you, Daniel
Yes, you have it right. In a synchsafe integer, only bits 0 thru 6 are used.
You do need to shift that zero from bit 7 to bit 0 of the next byte. Otherwise
the synchsafe integer will not be properly decoded.
---------------------------------------------------------------------
To unsubscribe, e-mail: id3v2-unsubscribe at id3.org
For additional commands, e-mail: id3v2-help at id3.org
More information about the ID3v2
mailing list