def readtag_header(self):
        """ Read a tag header """
        pos = self.tell()
        tag_type_and_length = self.readUI16()
        tag_length = tag_type_and_length & 0x003f
        if tag_length == 0x3f:
            # The SWF10 spec sez that this is a signed int.
            # Shouldn't it be an unsigned int?
            tag_length = self.readSI32();
        return SWFRecordHeader(tag_type_and_length >> 6, tag_length, self.tell() - pos)
dataset/ETHPy150Open timknip/pyswf/swf/stream.py/SWFStream.readtag_header/original