public DefineBinaryDataTag(FlashReader reader, TagRecord header) : base(reader, header) { CharacterId = reader.ReadUInt16(); reader.ReadUInt32(); BinaryData = reader.ReadBytes(header.Body.Length - 6); }
public DoABCTag(FlashReader reader, TagRecord header) : base(reader, header) { Flags = reader.ReadUInt32(); Name = reader.ReadNullTerminatedString(); int nameLength = (Encoding.UTF8.GetByteCount(Name) + 1); byte[] abcData = reader.ReadBytes(header.Body.Length - (nameLength + 4)); ABC = new ABCFile(abcData); }
public TagRecord(FlashReader reader) { Start = reader.Position; ushort header = reader.ReadUInt16(); TagType = (FlashTagType)(header >> 6); int length = (header & 63); if (length >= 63) { length = reader.ReadInt32(); IsSpecialLong = (length < 63); } BodyStart = reader.Position; Body = reader.ReadBytes(length); reader.Position = BodyStart; }
public DefineBitsLossless2Tag(FlashReader reader, TagRecord header) : base(reader, header) { CharacterId = reader.ReadUInt16(); BitmapFormat = reader.ReadByte(); BitmapWidth = reader.ReadUInt16(); BitmapHeight = reader.ReadUInt16(); _isCompressed = true; switch (BitmapFormat - 3) { case 0: break; case 1: case 2: { _compressedBitmapData = reader.ReadBytes(header.Body.Length - 7); break; } } }
public ASMethodBody(ABCFile abc, FlashReader reader) { _abc = abc; MethodIndex = reader.Read7BitEncodedInt(); MaxStack = reader.Read7BitEncodedInt(); LocalCount = reader.Read7BitEncodedInt(); InitialScopeDepth = reader.Read7BitEncodedInt(); MaxScopeDepth = reader.Read7BitEncodedInt(); Code = new ASCode(abc, this, reader.ReadBytes(reader.Read7BitEncodedInt())); Exceptions = new List<ASException>(reader.Read7BitEncodedInt()); for (int i = 0; i < Exceptions.Capacity; i++) Exceptions.Add(new ASException(abc, reader)); Traits = new List<ASTrait>(reader.Read7BitEncodedInt()); for (int i = 0; i < Traits.Capacity; i++) Traits.Add(new ASTrait(abc, reader)); Method.Body = this; }