Class Entry
Inheritance
System.Object
Entry
Assembly: IronZip.dll
Syntax
public class Entry : Object
Each file inside a ZIP archive, with its name, size, timestamp, and encryption state, is described by an Entry. A developer rarely constructs one; instead IronZipArchive.Entries() returns a List<Entry>, one per item in the archive, for inspecting contents before extracting. Reading these properties answers the common questions about an archive without unpacking it to disk.
The properties fall into groups. Identity covers Name, IsFile, IsDirectory, and Comment. Size and compression cover Size (the original byte length), CompressedSize (the stored length), CompressionMethod (an EncryptionMethods value), and the Crc checksum. Security covers IsCrypted and the AES detail properties (AESKeySize, AESEncryptionStrength, and related). Timing covers DateTime and DosTime. The remaining flags (HasCrc, IsUnicodeText, LocalHeaderRequiresZip64, and similar) expose low-level ZIP header state for advanced inspection.
To audit an archive, open it, call Entries(), and read the properties that matter: compare Size against CompressedSize to see the saving, check IsCrypted to find protected items, or read Name to list contents. The values are a snapshot of the archive as opened; changing them does not rewrite the archive, so use the archive's own Add, Delete, and ReplaceEntry methods to modify contents. The AES properties such as AESKeySize and AESEncryptionStrength are meaningful only when IsCrypted is true and the entry uses AES rather than Traditional encryption, and IsDirectory separates folder placeholders from real files when walking the list.
using IronZip;
using var archive = new IronZipArchive("input.zip");
foreach (Entry entry in archive.Entries())
{
Console.WriteLine($"{entry.Name} ({entry.Size} bytes)");
}
The view archive entries example lists contents this way, and the create, read, and extract tutorial shows reading entries inside a full workflow.
Constructors
Entry(ZipEntry)
Declaration
public Entry(ZipEntry zipEntry)
Parameters
| Type |
Name |
Description |
| ICSharpCode.SharpZipLib.Zip.ZipEntry |
zipEntry |
|
Properties
AESEncryptionStrength
Declaration
public int AESEncryptionStrength { get; set; }
Property Value
| Type |
Description |
| System.Int32 |
|
AESKeySize
Declaration
public int AESKeySize { get; set; }
Property Value
| Type |
Description |
| System.Int32 |
|
AESOverheadSize
Declaration
public int AESOverheadSize { get; set; }
Property Value
| Type |
Description |
| System.Int32 |
|
AESSaltLen
Declaration
public int AESSaltLen { get; set; }
Property Value
| Type |
Description |
| System.Int32 |
|
CanDecompress
Declaration
public bool CanDecompress { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
Declaration
public bool CentralHeaderRequiresZip64 { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
Declaration
public string Comment { get; set; }
Property Value
| Type |
Description |
| System.String |
|
CompressedSize
Declaration
public long CompressedSize { get; set; }
Property Value
| Type |
Description |
| System.Int64 |
|
CompressionMethod
Declaration
public EncryptionMethods CompressionMethod { get; set; }
Property Value
Crc
Declaration
public long Crc { get; set; }
Property Value
| Type |
Description |
| System.Int64 |
|
CryptoCheckValue
Declaration
public int CryptoCheckValue { get; set; }
Property Value
| Type |
Description |
| System.Int32 |
|
DateTime
Declaration
public DateTime DateTime { get; set; }
Property Value
| Type |
Description |
| System.DateTime |
|
DosTime
Declaration
public long DosTime { get; set; }
Property Value
| Type |
Description |
| System.Int64 |
|
EncryptionOverheadSize
Declaration
public int EncryptionOverheadSize { get; set; }
Property Value
| Type |
Description |
| System.Int32 |
|
ExternalFileAttributes
Declaration
public int ExternalFileAttributes { get; set; }
Property Value
| Type |
Description |
| System.Int32 |
|
Declaration
public byte[] ExtraData { get; set; }
Property Value
| Type |
Description |
| System.Byte[] |
|
Flags
Declaration
public int Flags { get; set; }
Property Value
| Type |
Description |
| System.Int32 |
|
HasCrc
Declaration
public bool HasCrc { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
HostSystem
Declaration
public int HostSystem { get; set; }
Property Value
| Type |
Description |
| System.Int32 |
|
IsCrypted
Declaration
public bool IsCrypted { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
IsDirectory
Declaration
public bool IsDirectory { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
IsDosEntry
Declaration
public bool IsDosEntry { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
IsFile
Declaration
public bool IsFile { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
IsUnicodeText
Declaration
public bool IsUnicodeText { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
Declaration
public bool LocalHeaderRequiresZip64 { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
Name
Declaration
public string Name { get; set; }
Property Value
| Type |
Description |
| System.String |
|
Offset
Declaration
public long Offset { get; set; }
Property Value
| Type |
Description |
| System.Int64 |
|
Size
Declaration
public long Size { get; set; }
Property Value
| Type |
Description |
| System.Int64 |
|
Version
Declaration
public int Version { get; set; }
Property Value
| Type |
Description |
| System.Int32 |
|
VersionMadeBy
Declaration
public int VersionMadeBy { get; set; }
Property Value
| Type |
Description |
| System.Int32 |
|
ZipFileIndex
Declaration
public long ZipFileIndex { get; set; }
Property Value
| Type |
Description |
| System.Int64 |
|