コード例 #1
0
 private void _read()
 {
     _compression = ((Compressions)m_io.ReadU1());
     _signature   = m_io.EnsureFixedContents(new byte[] { 87, 83 });
     _version     = m_io.ReadU1();
     _lenFile     = m_io.ReadU4le();
     if (Compression == Compressions.None)
     {
         __raw_plainBody = m_io.ReadBytesFull();
         var io___raw_plainBody = new KaitaiStream(__raw_plainBody);
         _plainBody = new SwfBody(io___raw_plainBody, this, m_root);
     }
     if (Compression == Compressions.Zlib)
     {
         __raw__raw_zlibBody = m_io.ReadBytesFull();
         __raw_zlibBody      = m_io.ProcessZlib(__raw__raw_zlibBody);
         var io___raw_zlibBody = new KaitaiStream(__raw_zlibBody);
         _zlibBody = new SwfBody(io___raw_zlibBody, this, m_root);
     }
 }
コード例 #2
0
 private void _read()
 {
     _compression = ((Compressions)m_io.ReadU1());
     _signature   = m_io.ReadBytes(2);
     if (!((KaitaiStream.ByteArrayCompare(Signature, new byte[] { 87, 83 }) == 0)))
     {
         throw new ValidationNotEqualError(new byte[] { 87, 83 }, Signature, M_Io, "/seq/1");
     }
     _version = m_io.ReadU1();
     _lenFile = m_io.ReadU4le();
     if (Compression == Compressions.None)
     {
         __raw_plainBody = m_io.ReadBytesFull();
         var io___raw_plainBody = new KaitaiStream(__raw_plainBody);
         _plainBody = new SwfBody(io___raw_plainBody, this, m_root);
     }
     if (Compression == Compressions.Zlib)
     {
         __raw__raw_zlibBody = m_io.ReadBytesFull();
         __raw_zlibBody      = m_io.ProcessZlib(__raw__raw_zlibBody);
         var io___raw_zlibBody = new KaitaiStream(__raw_zlibBody);
         _zlibBody = new SwfBody(io___raw_zlibBody, this, m_root);
     }
 }