SmartZip Archive File Library – Creating and Using Archive Files - The ZipEntry Class
(Page 2 of 4 )
The ZipEntry class is very useful for maintaining and reading metadata on the files you add or remove from a zip file. The ZipEntry object also acts as the marker through which the ZipOutputStream and ZipInputStream know which file in the compressed archive you are reading. The ZipEntry class has several members which are particularly important or useful. They are as follows:
- Name: This is the only required attribute (it must be set in the constructor) and contains the name of the file being compressed.
- Comment: Allows you to set a comment on the entry, useful for holding random information about the file.
- DateTime: Contains the date and time of the last modification of the zipped file.
- isCrypted: If a zip file you open happens to be encrypted, this will be set, and you will need to decrypt the file.
- Size: Gets the size of the entry, after it is uncompressed.
- CompressedSize: Gets the compressed size of an entry.
- Version: This holds the minimum Zip file version implementation required to extract this entry.
- VersionMadeBy: This holds the version of Zip implementation this entry was created with.
Next: Opening a Zip File >>
More .NET Articles
More By Michael Swanson