1
Vote

Strange support for compression methods

description

Heres a sample program using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using SevenZip;   namespace ConsoleApplication1 { class Program { static void Main(string[] args) { var inFile = @"d:\temp\file1.txt"; var outFile = @"d:\temp\2.txt";   foreach (OutArchiveFormat af in Enum.GetValues(typeof(SevenZip.OutArchiveFormat))) { foreach (CompressionMethod cm in Enum.GetValues(typeof(SevenZip.CompressionMethod))) { foreach (CompressionLevel cl in Enum.GetValues(typeof(SevenZip.CompressionLevel))) { SevenZip.SevenZipCompressor c = new SevenZipCompressor(); if (File.Exists(outFile)) { File.Delete(outFile); } bool s = false; try { c.ArchiveFormat = af; c.CompressionMethod = cm; c.CompressionLevel = cl; c.CompressFiles(outFile, inFile); s = true; } catch {   }   if (s) { Console.WriteLine("Supported combination {0}\t{1}\t{2}", af, cm, cl); } } } }   Console.ReadKey(); } } }   Output is strange. Especially for tar.   Supported combination SevenZip Copy None Supported combination SevenZip Copy Fast Supported combination SevenZip Copy Low Supported combination SevenZip Copy Normal Supported combination SevenZip Copy High Supported combination SevenZip Copy Ultra Supported combination SevenZip Deflate None Supported combination SevenZip Deflate Fast Supported combination SevenZip Deflate Low Supported combination SevenZip Deflate Normal Supported combination SevenZip Deflate High Supported combination SevenZip Deflate Ultra Supported combination SevenZip Deflate64 None Supported combination SevenZip Deflate64 Fast Supported combination SevenZip Deflate64 Low Supported combination SevenZip Deflate64 Normal Supported combination SevenZip Deflate64 High Supported combination SevenZip Deflate64 Ultra Supported combination SevenZip BZip2 Fast Supported combination SevenZip BZip2 Low Supported combination SevenZip BZip2 Normal Supported combination SevenZip BZip2 High Supported combination SevenZip BZip2 Ultra Supported combination SevenZip Lzma None Supported combination SevenZip Lzma Fast Supported combination SevenZip Lzma Low Supported combination SevenZip Lzma Normal Supported combination SevenZip Lzma High Supported combination SevenZip Lzma Ultra Supported combination SevenZip Lzma2 None Supported combination SevenZip Lzma2 Fast Supported combination SevenZip Lzma2 Low Supported combination SevenZip Lzma2 Normal Supported combination SevenZip Lzma2 High Supported combination SevenZip Lzma2 Ultra Supported combination SevenZip Ppmd None Supported combination SevenZip Ppmd Fast Supported combination SevenZip Ppmd Low Supported combination SevenZip Ppmd Normal Supported combination SevenZip Ppmd High Supported combination SevenZip Ppmd Ultra Supported combination SevenZip Default None Supported combination SevenZip Default Fast Supported combination SevenZip Default Low Supported combination SevenZip Default Normal Supported combination SevenZip Default High Supported combination SevenZip Default Ultra Supported combination Zip Copy None Supported combination Zip Copy Fast Supported combination Zip Copy Low Supported combination Zip Copy Normal Supported combination Zip Copy High Supported combination Zip Copy Ultra Supported combination Zip Deflate None Supported combination Zip Deflate Fast Supported combination Zip Deflate Low Supported combination Zip Deflate Normal Supported combination Zip Deflate High Supported combination Zip Deflate Ultra Supported combination Zip Deflate64 None Supported combination Zip Deflate64 Fast Supported combination Zip Deflate64 Low Supported combination Zip Deflate64 Normal Supported combination Zip Deflate64 High Supported combination Zip Deflate64 Ultra Supported combination Zip BZip2 Fast Supported combination Zip BZip2 Low Supported combination Zip BZip2 Normal Supported combination Zip BZip2 High Supported combination Zip BZip2 Ultra Supported combination Zip Lzma None Supported combination Zip Lzma Fast Supported combination Zip Lzma Low Supported combination Zip Lzma Normal Supported combination Zip Lzma High Supported combination Zip Lzma Ultra Supported combination Zip Ppmd None Supported combination Zip Ppmd Fast Supported combination Zip Ppmd Low Supported combination Zip Ppmd Normal Supported combination Zip Ppmd High Supported combination Zip Ppmd Ultra Supported combination Zip Default None Supported combination Zip Default Fast Supported combination Zip Default Low Supported combination Zip Default Normal Supported combination Zip Default High Supported combination Zip Default Ultra Supported combination GZip Copy None Supported combination GZip Copy Fast Supported combination GZip Copy Low Supported combination GZip Copy Normal Supported combination GZip Copy High Supported combination GZip Copy Ultra Supported combination GZip Deflate64 None Supported combination GZip Deflate64 Fast Supported combination GZip Deflate64 Low Supported combination GZip Deflate64 Normal Supported combination GZip Deflate64 High Supported combination GZip Deflate64 Ultra Supported combination GZip BZip2 None Supported combination GZip BZip2 Fast Supported combination GZip BZip2 Low Supported combination GZip BZip2 Normal Supported combination GZip BZip2 High Supported combination GZip BZip2 Ultra Supported combination GZip Lzma None Supported combination GZip Lzma Fast Supported combination GZip Lzma Low Supported combination GZip Lzma Normal Supported combination GZip Lzma High Supported combination GZip Lzma Ultra Supported combination GZip Lzma2 None Supported combination GZip Lzma2 Fast Supported combination GZip Lzma2 Low Supported combination GZip Lzma2 Normal Supported combination GZip Lzma2 High Supported combination GZip Lzma2 Ultra Supported combination GZip Ppmd None Supported combination GZip Ppmd Fast Supported combination GZip Ppmd Low Supported combination GZip Ppmd Normal Supported combination GZip Ppmd High Supported combination GZip Ppmd Ultra Supported combination GZip Default None Supported combination GZip Default Fast Supported combination GZip Default Low Supported combination GZip Default Normal Supported combination GZip Default High Supported combination GZip Default Ultra Supported combination BZip2 Copy None Supported combination BZip2 Copy Fast Supported combination BZip2 Copy Low Supported combination BZip2 Copy Normal Supported combination BZip2 Copy High Supported combination BZip2 Copy Ultra Supported combination BZip2 Deflate None Supported combination BZip2 Deflate Fast Supported combination BZip2 Deflate Low Supported combination BZip2 Deflate Normal Supported combination BZip2 Deflate High Supported combination BZip2 Deflate Ultra Supported combination BZip2 Deflate64 None Supported combination BZip2 Deflate64 Fast Supported combination BZip2 Deflate64 Low Supported combination BZip2 Deflate64 Normal Supported combination BZip2 Deflate64 High Supported combination BZip2 Deflate64 Ultra Supported combination BZip2 Lzma None Supported combination BZip2 Lzma Fast Supported combination BZip2 Lzma Low Supported combination BZip2 Lzma Normal Supported combination BZip2 Lzma High Supported combination BZip2 Lzma Ultra Supported combination BZip2 Lzma2 None Supported combination BZip2 Lzma2 Fast Supported combination BZip2 Lzma2 Low Supported combination BZip2 Lzma2 Normal Supported combination BZip2 Lzma2 High Supported combination BZip2 Lzma2 Ultra Supported combination BZip2 Ppmd None Supported combination BZip2 Ppmd Fast Supported combination BZip2 Ppmd Low Supported combination BZip2 Ppmd Normal Supported combination BZip2 Ppmd High Supported combination BZip2 Ppmd Ultra Supported combination BZip2 Default None Supported combination BZip2 Default Fast Supported combination BZip2 Default Low Supported combination BZip2 Default Normal Supported combination BZip2 Default High Supported combination BZip2 Default Ultra Supported combination Tar Copy None Supported combination Tar Copy Fast Supported combination Tar Copy Low Supported combination Tar Copy Normal Supported combination Tar Copy High Supported combination Tar Copy Ultra Supported combination Tar Deflate None Supported combination Tar Deflate Fast Supported combination Tar Deflate Low Supported combination Tar Deflate Normal Supported combination Tar Deflate High Supported combination Tar Deflate Ultra Supported combination Tar Deflate64 None Supported combination Tar Deflate64 Fast Supported combination Tar Deflate64 Low Supported combination Tar Deflate64 Normal Supported combination Tar Deflate64 High Supported combination Tar Deflate64 Ultra Supported combination Tar BZip2 None Supported combination Tar BZip2 Fast Supported combination Tar BZip2 Low Supported combination Tar BZip2 Normal Supported combination Tar BZip2 High Supported combination Tar BZip2 Ultra Supported combination Tar Lzma None Supported combination Tar Lzma Fast Supported combination Tar Lzma Low Supported combination Tar Lzma Normal Supported combination Tar Lzma High Supported combination Tar Lzma Ultra Supported combination Tar Lzma2 None Supported combination Tar Lzma2 Fast Supported combination Tar Lzma2 Low Supported combination Tar Lzma2 Normal Supported combination Tar Lzma2 High Supported combination Tar Lzma2 Ultra Supported combination Tar Ppmd None Supported combination Tar Ppmd Fast Supported combination Tar Ppmd Low Supported combination Tar Ppmd Normal Supported combination Tar Ppmd High Supported combination Tar Ppmd Ultra Supported combination Tar Default None Supported combination Tar Default Fast Supported combination Tar Default Low Supported combination Tar Default Normal Supported combination Tar Default High Supported combination Tar Default Ultra Supported combination XZ Copy None Supported combination XZ Copy Fast Supported combination XZ Copy Low Supported combination XZ Copy Normal Supported combination XZ Copy High Supported combination XZ Copy Ultra Supported combination XZ Deflate None Supported combination XZ Deflate Fast Supported combination XZ Deflate Low Supported combination XZ Deflate Normal Supported combination XZ Deflate High Supported combination XZ Deflate Ultra Supported combination XZ Deflate64 None Supported combination XZ Deflate64 Fast Supported combination XZ Deflate64 Low Supported combination XZ Deflate64 Normal Supported combination XZ Deflate64 High Supported combination XZ Deflate64 Ultra Supported combination XZ BZip2 Fast Supported combination XZ BZip2 Low Supported combination XZ BZip2 Normal Supported combination XZ BZip2 High Supported combination XZ BZip2 Ultra Supported combination XZ Lzma None Supported combination XZ Lzma Fast Supported combination XZ Lzma Low Supported combination XZ Lzma Normal Supported combination XZ Lzma High Supported combination XZ Lzma Ultra Supported combination XZ Lzma2 None Supported combination XZ Lzma2 Fast Supported combination XZ Lzma2 Low Supported combination XZ Lzma2 Normal Supported combination XZ Lzma2 High Supported combination XZ Lzma2 Ultra Supported combination XZ Ppmd None Supported combination XZ Ppmd Fast Supported combination XZ Ppmd Low Supported combination XZ Ppmd Normal Supported combination XZ Ppmd High Supported combination XZ Ppmd Ultra Supported combination XZ Default None Supported combination XZ Default Fast Supported combination XZ Default Low Supported combination XZ Default Normal Supported combination XZ Default High Supported combination XZ Default Ultra

comments

DrWeb wrote Jul 13, 2011 at 10:32 PM

in 7-zip for tar, bzip2 other combinations

wrote Feb 22, 2013 at 1:16 AM