Good day![]()
I'm reading through this article about the ID3v2 tag, so that I can easily read the tags of an MP3 file once I've understood it all. But I'm kind of stuck on one point and I was hoping someone could shed some light over this for me.
I understand that the header of the ID3v2 tag looke like this:
Im able to extract all parts of this header except for the size tag. This is what the article tells be about the size tag:Code:ID3v2/file identifier "ID3" ID3v2 version $03 00 ID3v2 flags %abc00000 ID3v2 size 4 * %0xxxxxxx
The ID3v2 tag size is encoded with four bytes where the most significant bit (bit 7) is set to zero in every byte, making a total of 28 bits. The zeroed bits are ignored, so a 257 bytes long tag is represented as $00 00 02 01.
Im not sure how to "convert" these 4 bytes to an integer taking what is written above into consideration. I've tried to simply construct an integer from these 4 bytes, but the resulting value is just too large. Some advice would be great![]()


Reply With Quote