static bool Decompress(ShockwaveFlash flash) { if (flash.CompressWith != CompressionStandard.None) { int compressedSizeMB = ((flash.ToArray().Length / 1024) / 1024); int uncompressedSizeMB = (((int)flash.FileLength / 1024) / 1024); ClearWriteLine("Decompressing... | ({0}MB) -> ({1}MB)", compressedSizeMB, uncompressedSizeMB); flash.Decompress(); } return !flash.IsCompressed; }
static byte[] Compress(ShockwaveFlash flash) { WriteLine("Compressing... | ({0}MB) | This may take a while, no more than a minute, hopefully.", (((int)flash.FileLength / 1024) / 1024)); return flash.Compress(); }