public Swf ReadSwf()
{
// compressed swf?
if (br.PeekChar()=='C')
Inflate();
SwfHeader header = new SwfHeader();
header.ReadData(br);
this.version = header.Version;
tagList = new BaseTagCollection();
bool readEndTag = false; //necessary for the 1 more byte bug
while (br.BaseStream.Position < br.BaseStream.Length && !readEndTag)
{
BaseTag b = SwfReader.ReadTag(this.version, this.br, this.tagList);
if (b != null)
{
if (b is EndTag)
readEndTag = true;
tagList.Add(b);
}
};
br.Close();
return new Swf(header, tagList);
}