<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial,helvetica,sans-serif;font-size:10pt"><div>Hi,<br><br>I think that the statement "the four bytes of decompressed size will precede the encryption method byte" within ID3v2.4 simply has been overlooked when adopting the text from the ID3v2.3 specification (a classical copy & paste error).<br>I therefore assume that this statement is *not* correct within ID3v2.4 - this is the only thing that makes sense. I think that the ID3v2.4 statement "this information is added [...] in the same order as the flags that indicates them" should be considered as the "stronger" rule.<br><br>I'd therefore say you should write the additional information bytes in the order as the flags indicate them. If you've found an ID3v2 implementation which does it the other way round, you could contact them and ask them to fix it.<br><br>The statement in question should be
 removed (or adopted) within the ID3v2.4 specification as it causes confusion and is definitely incorrect. (Who is responsible for that?)<br><br>Furthermore, there seems to be a typo within the statement "A 'Data Length Indicator' byte MUST be included in the frame." from section 4.1.2 "k - Compression". It should either be "A 'Data Length Indicator' bit MUST be included in the frame." or "A 'Data Length Indicator' MUST be included in the frame.". A data length indicator *byte* however makes no sense to me and also causes confusion - it should be the data length indicator *bit* in my opinion.<br><br>Regards,<br>Mathias K.<br><br><br></div><div style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"><br><div style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"><font size="2" face="Tahoma"><hr size="1"><b><span style="font-weight: bold;">Von:</span></b> Martin <martin.benkert@gmail.com><br><b><span style="font-weight:
 bold;">An:</span></b> id3v2@id3.org<br><b><span style="font-weight: bold;">Gesendet:</span></b> Freitag, den 7. August 2009, 21:21:41 Uhr<br><b><span style="font-weight: bold;">Betreff:</span></b> [ID3 Dev]  Order of additional information fields (ID3v2.4)<br></font><br>Hi,<br><br>I'd like to rephrase a question that has been asked on this list before,<br>but there has never been a complete answer.<br><br>Both ID3v2.3 and ID3v2.4 support additional information fields of frames<br><br>  ID3v2.3 section 3.3.1:<br>    Some flags indicates that the frame header is extended with<br>    additional information. This information will be added to the frame<br>    header in the same order as the flags indicating the additions. I.e.<br>    the four bytes of decompressed size will precede the encryption<br>    method byte. These additions to the frame header, while not included<br>    in the frame
 header size but are included in the 'frame size' field,<br>    are not subject to encryption or compression.<br><br>  Id3v2.4 section 4.1:<br>    Some frame format flags indicate that additional information fields<br>    are added to the frame. This information is added after the frame<br>    header and before the frame data in the same order as the flags that<br>    indicates them. I.e. the four bytes of decompressed size will precede<br>    the encryption method byte. These additions affects the 'frame size'<br>    field, but are not subject to encryption or compression.<br><br>While the order for ID3v2.3 is clear<br> <br>    Data Length indicator    $xx xx xx xx<br>    Encryption method        $xx<br>    Grouping indentificator  $xx<br><br>it appears to be ambiguous for ID3v2.4. For ID3v2.4 order of flags
 is<br><br>  1) Grouping identity requires a single unsigned byte<br>  2) Compression requires the presence of a data-length-indicator flag,<br>     but it does not add any information itself (unlike in ID3v2.3)<br>  3) Encryption requires a single unsigned byte as the encryption method,<br>     and might optionally use a data-length-indicator flag<br>  4) Unsynchronisation might optionally use a data-length-indicator flag<br>  5) Data-length-indicator flag is an sync-safe 32-bit value<br><br>This means that both the compression and the unsynchronisation flags will<br>not add extra data and the resulting order of fields is<br><br>    Grouping indentificator  $xx<br>    Encryption method        $xx<br>    Data Length indicator    4* %0xxxxxxx<br><br>But the ID3v2.4 standard still includes this statement from ID3v2.3<br><br>    I.e. the
 four bytes of decompressed size will precede the encryption<br>    method byte.<br><br>which makes no sense since there is no additional data related to compression.<br>It will set - just like encryption and unsynchronisation might - simply the<br>data-length-indicator flag. However it seems some people interpret this<br>statement in the way that the order should be<br>    Grouping indentificator  $xx<br>    Data Length indicator    4* %0xxxxxxx<br>    Encryption method        $xx<br><br>I think the first order is correct (and it is the only one that make sense to<br>me). Jess Harpur has also voted for this order on this mailing list<br>     <a href="http://article.gmane.org/gmane.comp.multimedia.id3v2/610" target="_blank">http://article.gmane.org/gmane.comp.multimedia.id3v2/610</a><br><br>However, the only implementation I was able to find that supports these
 fields<br>is jaudiotagger v1.0.9 which uses the second order.<br><br>So, right now its 2:1. And that's not good.<br><br>While its easy to identify the fields while reading (encryption method symbol<br>is in the range 0x80,...,0xf0, and data-length-indicator bytes are %0xxxxxxx),<br>it is still not clear to me how to write them in a standard compliant way.<br><br>I would really appreaciate your opinion about this.<br><br>Thanks,<br>Martin<br><br><br><br>---------------------------------------------------------------------<br>To unsubscribe, e-mail: <a ymailto="mailto:id3v2-unsubscribe@id3.org" href="mailto:id3v2-unsubscribe@id3.org">id3v2-unsubscribe@id3.org</a><br>For additional commands, e-mail: <a ymailto="mailto:id3v2-help@id3.org" href="mailto:id3v2-help@id3.org">id3v2-help@id3.org</a><br><br></div></div></div><br>


      </body></html>