Class ArchiveSaveOptions
Namespace: Aspose.Zip.Saving
Assembly: Aspose.Zip.dll (25.8.0)
Options for saving a zip archive.
public class ArchiveSaveOptionsInheritance
Inherited Members
object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()
Constructors
ArchiveSaveOptions()
public ArchiveSaveOptions()Properties
ArchiveComment
Gets or sets optional comment for the Zip file.
public string ArchiveComment { get; set; }Property Value
CloseEntrySource
Gets or sets a value indicating whether entries’ sources should be closed right after an entry has been compressed.
public bool CloseEntrySource { get; set; }Property Value
DataDescriptorPolicy
Gets or sets settings for Data Descriptor emission.
public ZipDataDescriptorPolicy DataDescriptorPolicy { get; set; }Property Value
Remarks
Default option is always present data descriptor.
Aspose.Zip.Saving.ZipDataDescriptorPolicy.ForAllFileEntries is not compatible with archive encryption.
Encoding
Gets or sets encoding for converting file names and other strings to bytes.
public Encoding Encoding { get; set; }Property Value
Remarks
If not set, code page 437 will be used.
EncryptionOptions
Gets of sets encryption settings for saving existing zip archive.
public EncryptionSettings EncryptionOptions { get; set; }Property Value
Examples
using (var archive = new Archive("plain.zip"))
{
archive.Save("encrypted.zip", new ArchiveSaveOptions() { EncryptionOptions = new AesEcryptionSettings("p@s$", EncryptionMethod.AES256) });
}Remarks
Do not use this options for regular composition of encrypted archive, use Aspose.Zip.Saving.ArchiveEntrySettings.EncryptionSettings instead.
Not compatible with Aspose.Zip.Saving.ArchiveSaveOptions.DataDescriptorPolicy having value Aspose.Zip.Saving.ZipDataDescriptorPolicy.ForAllFileEntries
EventsBag
Gets or sets container of events raising on archive saving.
public EventsBag EventsBag { get; set; }Property Value
ParallelOptions
Gets or sets settings for parallel compression.
public ParallelOptions ParallelOptions { get; set; }Property Value
Remarks
Assign it if you want to utilize several CPU cores while compressing several archive entries.
SelfExtractorOptions
Gets or sets settings for self extracted archive.
public SelfExtractorOptions SelfExtractorOptions { get; set; }Property Value
Remarks
Assign it if you need to compose executable program to extract an archive without any software installed on the target computer.