I want to know whether the zip.dll supports reading/decompressing rar file? if so, which version the api support it?
I try the zip.dll(v21.3), it report not to support reading/decompressing rar file.
And supporting to read/decompress Rar file may be concerned in the future version for zip.dll?
Thanks for your instruction.
I try :
Dim RARArchive As RarArchive = New RarArchive(Path & “\Test.rar”)
RARArchive.ExtractToDirectory(Path, “”)
RARArchive.Entries(0).Extract(Paht & “\Test.doc”, “”)
It works.
However, I want to Extract an single Entry (whose file size may be greater than 100Mb) with unzip progress info, how to do it?
And more, how to add a file (whose file size may be greater than 100Mb) into zip Archive with zip progress info?
I do not find the mothed to support this.
And more, how to rename/delete a file entry or a folder entry?
And how to create an zip archive with password?
and how to check whether a zip archive or rar archive has password protected?
if a zip/rar archive has password protected, and if a password is specified, how to validate whether the password is valid.
We have logged your requirement as ZIPNET-664 in our issue tracking system. You will be notified via this forum thread once there is any update available on it. We apologize for your inconvenience.
We have logged this feature request as ZIPNET-667 in our issue tracking system. You will be notified via this forum thread once it is resolved. We apologize for your inconvenience.
If a rar archive is compressed by RAR4 with filename containing Chinese characters, please see the demo pic( 123.png (29.5 KB)
) which displays correctly like this.
Whereas this rar archive is read by Aspose.zip.dll, the Chinese characters in filename are displayed in mess-up codes (222.png (6.5 KB)
). Please fix it!
To ensure a timely and accurate response, please attach the following resources here for testing:
Your input ZIP files.
Please create a standalone console application (source code without compilation errors) that helps us to reproduce your problem on our end and attach it here for testing.
As soon as you get these pieces of information ready, we will start investigation into your issue and provide you more information. Thanks for your cooperation.
PS: To attach these resources, please zip and upload them.
//Compression progress event
using (var archive = new Archive(new ArchiveEntrySettings()))
{
archive.CreateEntry("entry.bin", source);
int percentReady = 0;
archive.Entries[0].CompressionProgressed += (s, e) =>
{
int percent = (int)((100 * (long)e.ProceededBytes) / source.Length);
if (percent > percentReady)
{
Console.WriteLine(string.Format("{0}% compressed", percent));
percentReady = percent;
}
};
archive.Save(zipFile);
}
//Extracton progress event
using (Archive archive = new Archive(...))
{
int percentReady = 0;
archive.Entries[0].ExtractionProgressed += (s, e) =>
{
int percent = (int)((100 * e.ProceededBytes) / ((ArchiveEntry)s).UncompressedSize);
if (percent > percentReady)
{
Console.WriteLine(string.Format("{0}% decompressed", percent));
percentReady = percent;
}
};
}
Aspose.ZIP cannot be used to create or alter RAR archive. Updating/refreshing a file in RAR archive is never expected. Please see point 10 of RAR license. So, we have closed ZIPNET-667
You can figure out if ZIP entry is encrypted casting it to ArchiveEntryEncrypted. The issue ZIPNET-664 has been closed.
There is no way to verify the validity of password apart from trying to decompress.
Thanks for your demo.
But I fail to convert the demo into VB.net code based on zip.dll v21.4 because there is no ExtractionProgressed and CompressionProgressed.
Would you please provide me a full VB.net demo version on how to compress/decompress a archive with progress information?
Please use following VB.NET code example to implement ArchiveEntry.ExtractionProgressed event. Hope this helps you.
Dim archive As New Archive("c:\temp\input.zip")
AddHandler archive.Entries(0).ExtractionProgressed, AddressOf extractionProgressed
archive.ExtractToDirectory("C:\temp\out\")
Sub extractionProgressed(s As ArchiveEntry, e As ProgressEventArgs)
Dim percentReady As Integer = 0
Dim percent As Integer = CInt(100 * e.ProceededBytes / CType(s, ArchiveEntry).UncompressedSize)
If percent > percentReady Then
Console.WriteLine(String.Format("{0}% decompressed", percent))
percentReady = percent
End If
End Sub
Thanks for your reply.
But, I’m afraid you may misunderstand my question, please refer to the following code:
Dim RARArchive As RarArchive = New RarArchive("C:\Temp\out\Freshmen.rar")
AddHandler RARArchive.Entries(0).extractionProgressed, AddressOf extractionProgressed
It reports extractionProgressed is not a member of RARArchive class, that is to say, RARArchiveEntry does not support extractionProgressed.
Therefore, how to compress/decompress rararchive with progress info?