Compress XML Files to Password Encrypted .7z Format (C# .NET) | File Size Limitations of Evaluation Version

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;

@Prabakar4u,

After an initial test with the licensed latest (21.4) version of Aspose.ZIP for .NET, we were unable to reproduce this issue on our end. It seems that the problem occurs because you are using Aspose.ZIP for .NET in evaluation mode i.e. without applying a license. Please refer to the following section of documentation:

Other than that, Aspose.ZIP does not have any restrictions on file size. We have tested files up to 10 GB some time ago and the process ran smoothly.

If you want to test ‘Aspose.ZIP for .NET’ without the evaluation version limitations, then you can also request a 30-day Temporary License. Please refer to How to get a Temporary License?