Chilkat VB.NET ZipEntry Class Reference
ZipEntry
Represents a single file or directory entry within a Chilkat Zip object.
Object Creation
(C#)
Chilkat.ZipEntry obj = new Chilkat.ZipEntry();
(VB.NET)
Dim obj As New Chilkat.ZipEntry()
Properties
Comment As String
The comment stored within the Zip for this entry.
CompressedLength As Integer (ReadOnly)
The size in bytes of this entry's file data when compression is applied
CompressedLength64 As Int64 (ReadOnly)
The size in bytes of this entry's file data when compression is applied
CompressionLevel As Integer
The compression level. 0 = no compression, while 9 = maximum compression. The default is 6.
CompressionMethod As Integer
Set to 0 for no compression, or 8 for the Deflate algorithm. The Deflate algorithm is the default algorithm of the most popular Zip utility programs, such as WinZip
Crc As Integer (ReadOnly)
The CRC for the zip entry.
EntryID As Integer (ReadOnly)
The unique ID assigned by Zip.NET while the object is instantiated in memory.
EntryType As Integer (ReadOnly)
Indicates the origin of the entry. There are three possible values: (0) an entry in an existing Zip file, (1) a file on disk referenced by Zip.NET and to be added to the Zip, and (2) an entry created directly from data in memory.
FileDateTime As Date
The last-modified time of the Zip entry.
FileName As String
The file name of the Zip entry.
IsDirectory As Boolean (ReadOnly)
True if the Zip entry is a directory, false if it is a file.
LastErrorHtml As String (ReadOnly)
Error information in HTML format for the last method called.
LastErrorText As String (ReadOnly)
Error information in plain-text format for the last method called.
LastErrorXml As String (ReadOnly)
Error information in XML format for the last method called.
TextFlag As Boolean
To be documented soon...
UncompressedLength As Integer (ReadOnly)
The size in bytes of this entry's file data when uncompressed.
UncompressedLength64 As Int64 (ReadOnly)
The size in bytes of this entry's file data when uncompressed.
Methods
Function AppendData(ByVal inData As Byte()) As Boolean
Appends binary data to the zip entry's file contents.
Function Copy() As Byte()
Returns the compressed data as a byte array. Returns an empty byte array on failure
Function CopyToBase64() As String
Returns the compressed data as a Base64-encoded string. This data can be re-added to a Zip by calling Zip.AppendBase64. Returns Nothing on failure
Function CopyToHex() As String
Returns the compressed data as a hexidecimal encoded string. This data can be re-added to a Zip by calling Zip.AppendHex. Returns Nothing on failure
Function Extract(ByVal dirPath As String) As Boolean
Unzips this entry into the specified base directory. The file is unzipped to the subdirectory according to the relative path stored with the entry in the Zip. Use ExtractInto to unzip into a specific directory regardless of the path information stored in the Zip.
Function ExtractInto(ByVal dirPath As String) As Boolean
Unzip a file into a specific directory
Function Inflate() As Byte()
Inflate a file within a Zip directly into memory. Returns an empty byte array on failure
Function InflateToString(ByVal addCR As Boolean) As String
Inflate and return the uncompressed data as a string. Line-endings are modified to include or not include carriage-returns based on KeepCR. If KeepCR = False, then bare linefeeds are returned, otherwise CRLFs are returned. Returns Nothing on failure
Function InflateToString2() As String
Unzip a file directly into memory as a string, and leave line-endings unmodified. Returns Nothing on failure
Function InflateToString3(ByVal srcCharset As String) As String
Inflates a character data from a specified character encoding (such as iso-8859-1, or Shift_JIS) and returns the inflated data as a Unicode string. Returns Nothing on failure
Function NextEntry() As ZipEntry
Return the next entry (file or directory) within the Zip Returns Nothing on failure
Function ReplaceData(ByVal inData As Byte()) As Boolean
Replaces the zip entry's existing contents with new data.
Function SaveLastError(ByVal filename As String) As Boolean
Saves the last error information to an XML formatted file.
|