<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2963" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><SPAN class=005430810-14112006><FONT face=Arial color=#0000ff size=2>Good
point. I was recently wondering the same thing (as well as why someone
would want to start a tag search from the end of a file in the first place!).
The footer does seem like it may, in some situation, for someone, solve a
problem but IMO, it shouldn't foist knowledge of itself into the interpretation
of the size field. To interpret the size field, you now have to understand the
flags as well as choose the proper calculation in order to determine how many
bytes are included in the tag. Overly complex, and as you mention a breaking
change. I see no reason why it couldn't have been made part of the size field
and have a fixed position at the last 10 bytes of the header.
</FONT></SPAN></DIV>
<DIV><SPAN class=005430810-14112006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=005430810-14112006><FONT face=Arial color=#0000ff size=2>I
actually contemplated always outputing a footer in the tags I write since it's
simple to do and it removes the potential for a false sync signal should the
last byte of the tag be 0xFF. I decided against it due to the potential
incompatibility problems.</FONT></SPAN></DIV>
<DIV><SPAN class=005430810-14112006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=005430810-14112006><FONT face=Arial color=#0000ff size=2>I
tried to imagine why you might want to exclude the footer from the size but I've
come up blank. The closest I've come is that making a copy of the tag at the end
of the file can be as simple as a literal copy of the tag and append the 10 byte
footer. That should be sufficient for a tag search starting from the end of the
file but it wouldn't be complete since, you'd have to whack the header flags to
indicate the presence of the footer (I smell the potential for an inconsistency
between the header and footer here -- what would it mean to read a footer
that doesn't have the footer bit set?). </FONT></SPAN></DIV>
<DIV><SPAN class=005430810-14112006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=005430810-14112006><FONT face=Arial color=#0000ff
size=2>Assuming one buys into the idea that the header size should include the
footer, is there any real reason to keep the footer flag? As far as I can tell,
that flag is only present to allow you to "fix" the size calculation when
skipping the tag. No one is going to be checking that flag in order to verify
the 10 bytes following the tag are actually a footer. The flag does give you one
more significant bit for verification when searching for a footer, but skipping
to the header from the footer and verifying the header should be more than
sufficient.</FONT></SPAN></DIV>
<DIV><SPAN class=005430810-14112006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=005430810-14112006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=005430810-14112006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=005430810-14112006><FONT face=Arial color=#0000ff size=2>-
Ray</FONT></SPAN></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> Jim
[mailto:jmartin92@comcast.net]<BR><B>Sent:</B> Monday, November 13, 2006 11:22
PM<BR><B>To:</B> id3v2@id3.org<BR><B>Subject:</B> [ID3 Dev] Why is footer not
included in total size?<BR><BR></FONT></DIV>
<DIV><FONT face=Arial size=2>Hi.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I am wondering what the reasoning was behind
the size stored in ID3v2.4 tags not including the size of the footer (if
present). </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I've been looking through the source code for
some utilities for MP3 files and some other audio file types. Many of
these utilities use a simple method for skipping over the ID3v2 tag if it is
there. They read the first 10 bytes of the file, do some simple checking
(look for 'ID3', check that version bytes are less than $FF and in some cases
check that size bytes are syncsafe, i.e. < $80) and if it looks like a tag,
convert the size and skip that many bytes ahead (+ 10 bytes for header).
Most of these utilities would be broken if the tag has a footer.
They don't do any specific version checking or checking of the flags
byte. </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>If the size stored in ID3v2.4 tags included the
footer size (if it is present), it would make these tags much more backwards
compatible. (I know it is a pretty easy change to add checking
for the footer flag but wouldn't it have been better to make it
compatible with older apps that don't really need to read the tag, just
skip it?) Were there reasons that came up during development
why it was done the way it is? If so, I'd appreciate if someone could
share them with me. Or if there is somewhere I can read about this (like
some archive of the mailing list) I would appreciate someone pointing me in
the right direction.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Thanks.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Jim Martin</FONT></DIV>
<DIV><FONT face=Verdana color=#808080 size=1><FONT face=Arial color=#000000
size=2></FONT> </DIV></BLOCKQUOTE></FONT></BODY></HTML>