PowerTCP Zip Compression for .NET
ErrorCode Enumeration
Example Example 




Enumerates the error codes.
Syntax
<CategoryAttribute("Enumeration")>
<DescriptionAttribute("Enumerate the fatal error codes that Dart Zip component currently defined. ")>
Public Enum ErrorCode 
   Inherits System.Enum
Dim instance As ErrorCode
[Category("Enumeration")]
[Description("Enumerate the fatal error codes that Dart Zip component currently defined. ")]
public enum ErrorCode : System.Enum 
[Category("Enumeration")]
[Description("Enumerate the fatal error codes that Dart Zip component currently defined. ")]
__value public enum ErrorCode : public System.Enum 
[Category("Enumeration")]
[Description("Enumerate the fatal error codes that Dart Zip component currently defined. ")]
public enum class ErrorCode : public System.Enum 
Members
MemberDescription
AbortThe Archive component has aborted the current operation. This is a result of the Archive.Abort method called in the code.
AccessRemovableMediaFailed Failed to access available space information on the removable media.
AddRemoveOpNotAllowedSpanning error: addition or deletion operations are not allowed on spanned or split archives.
AESAuthenticationCodeMismatchAES encryption or decryption error: the authentication failed.
AESEncryptionDllNotCreatedDart.PowerTCP.Aes.dll could not be created in the application directory. Write permissions must be enabled to create this dll.
ArchiveItemInvalidCastArchiveItem instance expected for this operation.
BuildCodeTreeErrorDeflate decompression error: an error occurred while building the code tree.
CDEndRecordNotFound

The central directory end record cannot be found. Either it is not a standard zip format, or if you are trying to open a spanned zip archive on removable media. Please insert the last volume.

CDSignatureNotFoundThe central directory signature was not found. This zip archive has been corrupted.
CollectionEmptyThe collection is empty.
CompressionMethodNotAppliedThe specified compression method was not applied because the item is already compressed.
CompressionMethodNotSupportedThe compression method is not supported.
CRCMismatchDeflate decompression error: the CRC check failed.
DestinationEmptyThe destination parameter is empty.
DestinationNotWritableThe destination of a Zip operation must be writable.
DestStreamNotAllowedForZipWSpanSpanning error: when spanning or splitting, the destination is not allowed to be a stream.
DirectoryNotAccessibleThe directory is not accessible so the files under the directory are not added to the collection.
DistanceCodeCountOutOfRangeDeflate decompression error: the distance code count is out of range.
DistanceCodeOutOfRangeDeflate decompression error: the distance code is out of range.
DistanceErrorDeflate decompression error: an error was found in distance codes.
DistanceExceedMaximumDeflate decompression error: the distance exceeds the maximum.
DriveNotRemovableSpanning error: The drive is not removable.
EncryptionNotChangedThe encryption could not be changed to Encryption.None since the item is encrypted. The item must first be unzipped and then re-zipped with no encryption.
EncryptionNotSpecifiedYou have set up a password. You need to set up the encryption method as well.
EncryptionSkipped

The specified encryption was not applied to the item because the item is encrypted already. Unzip it first and then re-zip it if you really would like to change the encryption method or use a different password.

ExcludeDirectoryNotAccessibleThe directory is not accessible so the files under the directory are not added to the collection.
FileCreationFailedFile creation failed.
FileExistsThe destination file exists. Use Overwrite property if you would like to overwrite it.
FileNotFoundThe specified file was not found.
FileNotFoundForSelfExtractionThe file 'DartAttach.bin' is needed for self extraction. It needs to be in the System32 directory.
FileOpenThe file is open.
FileOpenErrorFile open failed.
FileWOpenErrorFile could not be opened for writing.
GzipFormatCompressionNotSupported

This release does not support gZip compression. Therefore, Add, Insert, Remove or Zip operations are not allowed to apply to a gZip archive.

HuffmanTreeHeightErrorDeflate error: Huffman tree height exceeds the maximum.
ImproperOperationImproper operation, refer to the Help Documentation for more information.
ImproperSpanSizeThe specified PartSize for spanning is invalid.
ImproperZipFileThe specified zip archive is invalid.
InputBitLengthErrorDeflate decompression error: an error was found with input bit lengths when building the code tree
InternalErrorAn internal error has occurred. Call Dart customer service for support.
InvalidDirectoryThe specified directory is invalid.
InvalidEncryptionParameterInvalid parameters for encryption or decryption.
InvalidFileNameThe specified name contains invalid characters or is too long.
InvalidLengthCodeDeflate decompression error: an invalid length code was found.
InvalidMediaThe specified media is invalid.
InvalidPasswordThe given password is invalid.
InvalidWzAESEncryptionFormatThe zip archive is marked with a WinZip AES encryption format but it contains some invalid data.
ItemIndexOutOfRangeThe item index is out of range.
ItemNameEmptyEither the specified name is empty or it contains invalid characters.
LendthCodeErrorDeflate decompression error: the number of a length code i should be less than of equal to pow(2, i).
LengthCode16ErrorDeflate decompression error: error in length code 16.
LengthCodeCountOutOfRangeDeflate decompression error: the length code count is out of range.
LengthExceedMaximumDeflate decompression error: the length exceeds the maximum.
LiteralCodeCountOutOfRangeDeflate decompression error: the literal code count is out of range.
LiteralLengthCodeOutOfRangeDeflate decompression error: the literal/length code is out of range.
LocalHeaderSignatureNotFoundThe local header signature was not found. This zip archive might have been corrupted.
NoCompressionErrorDeflate decompression error: a data block is marked as no compression but it is not.
NotEnoughSpaceForCDEndRecord

The removable media does not have enough space for storing the Central Directory End Record. You might have something on the volume.

NotEnoughSpaceForSpanThe removable media does not have enough available space according to the Span Configuration.
NotImplementedThe selection is not implemented in the current version.
NotSupportedThe selected feature is not supported by the current version.
OKNo error.
PasswordEmptyThe specified encryption was not applied to the item because the password is empty.
PasswordRequiredA password is required for unzipping this archive/item because it is encrypted.
PropertyValueOutOfRangeProperty value out of range. refer to the Help documentation for more information.
ReadErrorA read error has occurred.
RemovableMediaHasIncorrectLabel

The removable media has a label different from expected. Set the DiskEventArgs.IgnoreLabel to true if you want to use the removable media anyway.

RemovableMediaNotReadyThe removable media is not ready.
SizeMismatchDeflate decompression error: the decompressed data size does not match the uncompressed data size.
SourceArchiveNotReadable

The source archive is not readable. If you pass a memory stream archive, closing the stream may cause this problem.

SourceEmpty

Either no source is specified or the specified source is empty. For an Unzip operation, a source zip archive has to be opened first.

SpanArchiveLimitationSpanned archive limitation: Add, Remove, or Zip operations can not be applied to a spanned archive.
SpanErrorAn error occurred during the span operation.
StreamCopyFailedStream copy failed, either the source can't be read or the destination can't be written to.
TempFileCreationErrorThe temporary file creation failed.
TempFileNameError(DEBUG error code)Some difficulty in making up the temp file name.
TempFileOperationFailureOperations on the temp file failed. Either the temp file has been destroyed or moved.
UnknownAlgorithmThe encryption algorithm is not supported by Dart Archive component.
UnknownBlockTypeDeflate decompression error: an invalid data block type was found.
UnsupportedFormatThe source archive is in the format that the current version does not support.
UnzipErrorAn error has occurred during the unzip operation.
WriteBitsTooLongDeflate error: write bit length exceeds the maximum.
WriteErrorA write error has occurred.
Example
The following example demonstrates using QuickZip and specifying specific options. Only QuickZip is required in this operation.
' Be sure to import the namespace by putting "Imports Dart.PowerTCP.Zip"
' at the top of your class.

' Preserve the path structure of the files
Archive1.PreservePath = True
	
' Include any subdirectories
Archive1.IncludeSubs = True
	
' Specify compression level
Archive1.CompressionLevel = CompressionLevel.Medium

' Use the Deflate compression method
Archive1.DefaultCompressionMethod = CompressionMethod.Deflate

' Exclude any text files
Archive1.ExcludePattern = "*.txt"

' Set to use encryption
Archive1.DefaultEncryption = Encryption.Standard

' Specify the password
Archive1.Password = "testme"

' Perform the compression operation - this is the only required method for the operation
Archive1.QuickZip("c:\\Test\\*.*", "c:\\test.zip")
// Be sure to import the namespace by putting "using Dart.PowerTCP.Zip;"
// at the top of your class.

// Preserve the path structure of the files
archive1.PreservePath = true;

// Include any subdirectories
archive1.IncludeSubs = true;
			
// Specify compression level
archive1.CompressionLevel = CompressionLevel.Medium;
			
// Use the Deflate compression method
archive1.DefaultCompressionMethod = CompressionMethod.Deflate;
			
// Exclude any text files
archive1.ExcludePattern = "*.txt";
			
// Set to use encryption
archive1.DefaultEncryption = Encryption.Standard;

// Specify the password
archive1.Password = "testme";
			
// Perform the compression operation - this is the only required method for the operation
archive1.QuickZip("c:\\Test\\*.*", "c:\\test.zip");
Inheritance Hierarchy

System.Object
   System.ValueType
      System.Enum
         Dart.PowerTCP.Zip.ErrorCode

See Also

Reference

Dart.PowerTCP.Zip Namespace


PowerTCP Zip for .NET Documentation Version 2.1.1
© 2018 Dart Communications. All Rights Reserved.
Send comments on this topic