Hi Guys,
I have the code snippet where I have been compressing the .xml file into .7z format with Password-protected (Encrypted password).
However, while de-compress the file, the file is corrupted. (i.e. only half the file is present.)
eg: Actual file:10000KB. File after compression and de-compressed: ~5000KB. The original file is lost.
It happens only for huge file sizes. Is there a limit?
Current version being used: Aspose.zip - 21.4.0.0
Code Snippet:
using (FileStream sevenZipFile = File.Open(filePath + “.7z”, FileMode.Create))
{
using (var archive = new SevenZipArchive())
{
if (!string.IsNullOrEmpty(pwd))
{
archive.CreateEntry(fileName, filePath, false, new SevenZipEntrySettings(new SevenZipStoreCompressionSettings(), new SevenZipAESEncryptionSettings(pwd)));
}
else
{
archive.CreateEntry(fileName, filePath, false, null);
}
archive.Save(sevenZipFile);
}
sevenZipFile.Close();
output = sevenZipFile;