Hi JuanBlanco,
any chance you could post an example to unzip a file with passowrd protection?
Thx in advance!
any chance you could post an example to unzip a file with passowrd protection?
Thx in advance!
string password = "wrongpass";
string inpath = @"D:\Test\File_with_pass.rar";
RarArchive rar = RarArchive.Open(inpath, SharpCompress.Common.Options.LookForHeader, password);
rar.WriteToDirectory(@"D:\Test\out");
rar.Dispose();
How can I avoid to create corrupted files and detect if the password was entered correctly? using (Stream stream = File.Create(sZipFile))
{
archive.SaveTo(stream, CompressionType.LZMA);
}
I want to display the progression to the user. using (Stream stream = File.Create(sZipFile))
{
archive.SaveTo(stream, CompressionType.LZMA);
}
I want to display the progression to the user.var codec = SharpCompressBZip2DeltaCodec.Instance;
var bytes = codec.Encode(IList<T> list);
var listOut = codec.Decode<T>(bytes);
Custom codecs or codec methods can be added to handle arbitrarily complex data structures. var bytes = codec.Encode(list, numBlocks: 4, level: CompressionLevel.Fastest);
I Hope others will find this useful.