/// <summary>
/// Writes the contents of this SwfFile instance to a stream.
/// Compression is used if configured.
/// </summary>
/// <param name="output">The destination stream to write to</param>
public void Write(Stream output)
{
if (SwfFile.Configuration.WriteCompressed)
{
CwsFile cws = new CwsFile();
cws.CompressionLevel = SwfFile.Configuration.WriteCompressionLevel;
cws.WriteContent = new MemoryStream();
WriteContent(cws.WriteContent);
cws.Version = this.Version;
// copy frame information from old FWS record
cws.FrameHeader = FwsSource.FrameHeader;
cws.Write(output);
}
else
{
FwsFile fws = new FwsFile();
fws.WriteContent = new MemoryStream();
WriteContent(fws.WriteContent);
fws.Version = this.Version;
// copy frame information from old FWS record
fws.FrameHeader = FwsSource.FrameHeader;
fws.Write(output);
}
}