public ProductInfoTag(FlashReader reader, TagRecord header) : base(reader, header) { ProductId = (FlashProductId)reader.ReadUInt32(); Edition = (FlashEdition)reader.ReadUInt32(); MajorVersion = reader.ReadByte(); MinorVersion = reader.ReadByte(); BuildLow = reader.ReadUInt32(); BuildHigh = reader.ReadUInt32(); CompilationDate = _epoch.AddMilliseconds(reader.ReadUInt64()); }
public ProductInfoTag(HeaderRecord header, FlashReader input) : base(header) { Product = (FlashProduct)input.ReadUInt32(); Edition = (FlashEdition)input.ReadUInt32(); MajorVersion = input.ReadByte(); MinorVersion = input.ReadByte(); BuildLow = input.ReadUInt32(); BuildHigh = input.ReadUInt32(); CompilationDate = FlashTools.Epoch .AddMilliseconds(input.ReadUInt64()); }
public DefineBinaryDataTag(HeaderRecord header, FlashReader input) : base(header) { Id = input.ReadUInt16(); input.ReadUInt32(); // Reserved | Must equal '0'. Data = input.ReadBytes(header.Length - 6); }
protected ShockwaveFlash(FlashReader input) : this(false) { Compression = (CompressionKind)input.ReadString(3)[0]; Version = input.ReadByte(); FileLength = input.ReadUInt32(); switch (Compression) { case CompressionKind.LZMA: { byte[] decompressed = LZMA.Decompress(input.BaseStream, ((int)FileLength - 8)); _input = new FlashReader(decompressed); break; } case CompressionKind.ZLIB: { _input = ZLIB.WrapDecompressor(input.BaseStream); break; } case CompressionKind.None: { _input = input; break; } } Frame = new FrameRecord(_input); }
/// <summary> /// Initializes a new instance of the <see cref="ShockwaveFlash"/> class based on the specified array of bytes. /// </summary> /// <param name="data">The data containing the raw Shockwave Flash(SWF) file.</param> public ShockwaveFlash(byte[] data) { _flashData = data; _abcFiles = new List <ABCFile>(); Reader = new FlashReader(data); Tags = new List <FlashTag>(); Dictionary = new FlashDictionary(); Signature = Reader.ReadString(3); CompressWith = (CompressionStandard)Signature[0]; Version = Reader.ReadByte(); FileLength = Reader.ReadUInt32(); if (CompressWith == CompressionStandard.None) { ReadFrameInformation(); } else { IsCompressed = true; } }
public DefineBinaryDataTag(FlashReader reader, TagRecord header) : base(reader, header) { CharacterId = reader.ReadUInt16(); reader.ReadUInt32(); BinaryData = reader.ReadBytes(header.Body.Length - 6); }
public DoABCTag(HeaderRecord header, FlashReader input) : base(header) { Flags = input.ReadUInt32(); Name = input.ReadNullString(); int partialLength = (Encoding.UTF8.GetByteCount(Name) + 5); ABCData = input.ReadBytes(header.Length - partialLength); }
public DefineSoundTag(HeaderRecord header, FlashReader input) : base(header) { Id = input.ReadUInt16(); Format = input.ReadUB(4); Rate = input.ReadUB(2); Size = input.ReadUB(1); SoundType = input.ReadUB(1); SoundSampleCount = input.ReadUInt32(); SoundData = input.ReadBytes(header.Length - 7); }
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); }