Exemple #1
0
        /// <summary>
        /// Decompresses a single file using a given compressor, saving all debug or
        /// visualisation outputs to the specified directory.
        /// </summary>
        public static void DecompressFile(Compressor compr, string sourcePath, string destDir, string destFile)
        {
            FileStream input = File.Open(sourcePath, FileMode.Open, FileAccess.Read, FileShare.Read);
            IntField   f     = compr.Decode(input);

            input.Close();

            Directory.CreateDirectory(destDir);
            f.ArgbToBitmap().Save(Path.Combine(destDir, destFile), ImageFormat.Png);
            SaveComprImages(compr, destDir);
            SaveComprDumps(compr, destDir);
            SaveComprCounters(compr, destDir);
        }