,
7z HostPage  
http://www.7-zip.org/

7z.dll
http://sourceforge.jp/projects/sfnet_winautotasks/downloads/Applications/7z.dll/

SevenZipSharp 사이트 
http://sevenzipsharp.codeplex.com/


 
// 사용법
try

{

this.Cursor = Cursors.WaitCursor;

string zipName = textBoxFackingFilesFolder.Text + @"\" + PackingFileName + ".7z";

string[] CompressFileNames = GetCompressFileNames(DiffFiles);


/// 7Zip 라이브러리를 사용하기 위해서 꼭 7z.dll 파일을 실행파일이 있는 곳에 놓아두고 설정한다 

SevenZipCompressor.SetLibraryPath(String.Format(@"{0}\7z.dll", Application.StartupPath));


SevenZipCompressor szc = new SevenZipCompressor();  

szc.CompressionMethod = CompressionMethod.Lzma;

szc.CompressionMode = SevenZip.CompressionMode.Create;

szc.CompressionLevel = CompressionLevel.Normal;

szc.CompressFiles(zipName, CompressFileNames);

}

catch (Exception ex)

{

MessageBox.Show(ex.ToString());

}

finally

{

this.Cursor = Cursors.Default;

}



저작자 표시
신고
by 흥배 2012.11.07 09:00
| 1 |