docs: def add(self, tagname, tagvalue):
          """
          :returns: numeric index associated to the tag
          """
          dic = getattr(self, tagname + '_idx')
          try:
              return dic[tagvalue]
          except KeyError:
              dic[tagvalue] = idx = len(dic)
              getattr(self, tagname).append(tagvalue)
              if idx > TWO16:
                  raise InvalidFile('contains more then %d tags' % TWO16)
              return idx