ChilkatZipEntry2 ActiveX Reference (Visual Basic)
ChilkatZipEntry2
Represents a single file or directory entry within a Chilkat Zip object.
Properties
Comment As String
The comment stored within the Zip for this entry.
CompressedLength As Long (read-only)
The size of this file when Zip compression is applied
CompressionLevel As Long
The compression level. 0 = no compression, while 9 = maximum compression. The default is 6.
CompressionMethod As Long
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 Long (read-only)
The CRC for the zip entry.
EntryID As Long (read-only)
The unique ID assigned by Zip.NET while the object is instantiated in memory.
EntryType As Long (read-only)
Indicates the origin of the entry. There are three possible values: (0) a file on disk referenced by Zip.NET and to be added to the Zip, (1) an entry in an existing Zip file, 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.
InternalId As Long (read-only)
To be documented soon...
IsDirectory As Long (read-only)
True if the Zip entry is a directory, false if it is a file.
LastErrorHtml As String (read-only)
Error information in HTML format for the last method called.
LastErrorText As String (read-only)
Error information in plain-text format for the last method called.
LastErrorXml As String (read-only)
Error information in XML format for the last method called.
UncompressedLength As Long (read-only)
The size in bytes of the Zip entry when uncompressed.
Methods
AppendData(data As Variant)
Append text or binary data to a file within a Zip archive
Copy() As Variant
Returns the compressed data as a byte array. Returns a zero-length byte array (as a Variant) on failure
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 a null on failure
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 a null on failure
Extract(dirPath As String) As Long
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.
ExtractInto(dirPath As String) As Long
Unzip a file into a specific directory
Inflate() As Variant
Inflate a file within a Zip directly into memory. Returns a zero-length byte array (as a Variant) on failure
InflateToString(addCR As Long) 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 a null on failure
InflateToString2() As String
Unzip a file directly into memory as a string, and leave line-endings unmodified. Returns a null on failure
InflateToString3(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 a null on failure
NextEntry() As ChilkatZipEntry2
Return the next entry (file or directory) within the Zip
ReplaceData(data As Variant)
Replace the contents of a file within a Zip archive
SaveLastError(filename As String)
Saves the last error information to an XML formatted file.
|