Class ArchiveLoadOptions
名称: Aspose.Zip 組み合わせ: Aspose.Zip.dll (25.5.0)
アーカイブが圧縮されたファイルからアップロードされるオプション。
public class ArchiveLoadOptions
Inheritance
相続人
object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()
Constructors
ArchiveLoadOptions()
public ArchiveLoadOptions()
Properties
DecryptionPassword
入力を解読するためにパスワードを入力または設定します。
public string DecryptionPassword { get; set; }
不動産価値
Examples
アーカイブエクストラクションで一度の暗号化パスワードを提供することができます。
using (FileStream fs = File.OpenRead("encrypted_archive.zip"))
{
using (var extracted = File.Create("extracted.bin"))
{
using (Archive archive = new Archive(fs, new ArchiveLoadOptions() { DecryptionPassword = "p@s$" }))
{
using (var decompressed = archive.Entries[0].Open())
{
byte[] b = new byte[8192];
int bytesRead;
while (0 < (bytesRead = decompressed.Read(b, 0, b.Length)))
extracted.Write(b, 0, bytesRead);
}
}
}
}
こちらも見る
ArchiveEntry . Open ( string )
Encoding
入力名のコードを入力または設定します。
public Encoding Encoding { get; set; }
不動産価値
Examples
入力名は、ZIPファイルの特性に関係なく指定された暗号化を使用して構成されています。
using (FileStream fs = File.OpenRead("archive.zip"))
{
using (Archive archive = new Archive(fs, new ArchiveLoadOptions() { Encoding = System.Text.Encoding.GetEncoding(932) }))
{
string name = archive.Entries[0].Name;
}
}
EntryExtractionProgressed
あるいは、いくつかのバイトが抽出されたときに呼び出された代表者を取得または設定します。
public EventHandler<progresseventargs> EntryExtractionProgressed { get; set; }
不動産価値
EventHandler < ProgressEventArgs >
Examples
Archive archive = new Archive("archive.zip",
new ArchiveLoadOptions() { EntryExtractionProgressed = (s, e) => { int percent = (int)((100 * e.ProceededBytes) / ((ArchiveEntry)s).UncompressedSize); } })
Remarks
イベントメッセンジャーは、抽出が進められている Aspose.Zip.ArchiveEntry インスタンスです。
EntryListed
コンテンツテーブルに記載されている入力時に呼び出された代表者を受け取るか、または置く。
public EventHandler<entryeventargs> EntryListed { get; set; }
不動産価値
EventHandler < EntryEventArgs >
Examples
Archive archive = new Archive("archive.zip", new ArchiveLoadOptions() { EntryListed = (s, e) => { Console.WriteLine(e.Entry.Name); } });
SkipChecksumVerification
ZIP エントリーのチェックスム検証が無視され、不適合が無視されるかどうかを示す値を取得または設定します。
public bool SkipChecksumVerification { get; set; }