コード例 #1
0
ファイル: Program.cs プロジェクト: proxymoron/HabBit
        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);
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: ErrorMaker/HabBit-2
        static bool Decompress(ShockwaveFlash flash)
        {
            if (flash.Compression != CompressionType.None)
            {
                Console.Clear();
                int compressedSizeMB   = ((flash.ToByteArray().Length / 1024) / 1024);
                int uncompressedSizeMB = (((int)flash.FileLength / 1024) / 1024);

                Console.Write($"Decompressing... | ({compressedSizeMB}MB)");
                flash.Decompress();
                WriteLine($" -> ({uncompressedSizeMB}MB)");
            }
            return(!flash.IsCompressed);
        }