Fingerprint_Card
Loading...
Searching...
No Matches
ICSharpCode.SharpZipLib.Zip.ZipConstants Class Referencesealed

This class contains constants used for Zip format files. More...

Static Public Member Functions

static string ConvertToString (byte[] data, int count)
 Convert a portion of a byte array to a string.
static string ConvertToString (byte[] data)
 Convert a byte array to string.
static string ConvertToStringExt (int flags, byte[] data, int count)
 Convert a byte array to string.
static string ConvertToStringExt (int flags, byte[] data)
 Convert a byte array to string.
static byte[] ConvertToArray (string str)
 Convert a string to a byte array.
static byte[] ConvertToArray (int flags, string str)
 Convert a string to a byte array.

Static Public Attributes

const int VersionMadeBy = 51
 The version made by field for entries in the central header when created by this library.
const int VERSION_MADE_BY = 51
 The version made by field for entries in the central header when created by this library.
const int VersionStrongEncryption = 50
 The minimum version required to support strong encryption.
const int VERSION_STRONG_ENCRYPTION = 50
 The minimum version required to support strong encryption.
const int VERSION_AES = 51
 Version indicating AES encryption.
const int VersionZip64 = 45
 The version required for Zip64 extensions (4.5 or higher)
const int LocalHeaderBaseSize = 30
 Size of local entry header (excluding variable length fields at end)
const int LOCHDR = 30
 Size of local entry header (excluding variable length fields at end)
const int Zip64DataDescriptorSize = 24
 Size of Zip64 data descriptor.
const int DataDescriptorSize = 16
 Size of data descriptor.
const int EXTHDR = 16
 Size of data descriptor.
const int CentralHeaderBaseSize = 46
 Size of central header entry (excluding variable fields)
const int CENHDR = 46
 Size of central header entry.
const int EndOfCentralRecordBaseSize = 22
 Size of end of central record (excluding variable fields)
const int ENDHDR = 22
 Size of end of central record (excluding variable fields)
const int CryptoHeaderSize = 12
 Size of 'classic' cryptographic header stored before any entry data.
const int CRYPTO_HEADER_SIZE = 12
 Size of cryptographic header stored before entry data.
const int LocalHeaderSignature = 'P' | ('K' << 8) | (3 << 16) | (4 << 24)
 Signature for local entry header.
const int LOCSIG = 'P' | ('K' << 8) | (3 << 16) | (4 << 24)
 Signature for local entry header.
const int SpanningSignature = 'P' | ('K' << 8) | (7 << 16) | (8 << 24)
 Signature for spanning entry.
const int SPANNINGSIG = 'P' | ('K' << 8) | (7 << 16) | (8 << 24)
 Signature for spanning entry.
const int SpanningTempSignature = 'P' | ('K' << 8) | ('0' << 16) | ('0' << 24)
 Signature for temporary spanning entry.
const int SPANTEMPSIG = 'P' | ('K' << 8) | ('0' << 16) | ('0' << 24)
 Signature for temporary spanning entry.
const int DataDescriptorSignature = 'P' | ('K' << 8) | (7 << 16) | (8 << 24)
 Signature for data descriptor.
const int EXTSIG = 'P' | ('K' << 8) | (7 << 16) | (8 << 24)
 Signature for data descriptor.
const int CENSIG = 'P' | ('K' << 8) | (1 << 16) | (2 << 24)
 Signature for central header.
const int CentralHeaderSignature = 'P' | ('K' << 8) | (1 << 16) | (2 << 24)
 Signature for central header.
const int Zip64CentralFileHeaderSignature = 'P' | ('K' << 8) | (6 << 16) | (6 << 24)
 Signature for Zip64 central file header.
const int CENSIG64 = 'P' | ('K' << 8) | (6 << 16) | (6 << 24)
 Signature for Zip64 central file header.
const int Zip64CentralDirLocatorSignature = 'P' | ('K' << 8) | (6 << 16) | (7 << 24)
 Signature for Zip64 central directory locator.
const int ArchiveExtraDataSignature = 'P' | ('K' << 8) | (6 << 16) | (7 << 24)
 Signature for archive extra data signature (were headers are encrypted).
const int CentralHeaderDigitalSignature = 'P' | ('K' << 8) | (5 << 16) | (5 << 24)
 Central header digitial signature.
const int CENDIGITALSIG = 'P' | ('K' << 8) | (5 << 16) | (5 << 24)
 Central header digitial signature.
const int EndOfCentralDirectorySignature = 'P' | ('K' << 8) | (5 << 16) | (6 << 24)
 End of central directory record signature.
const int ENDSIG = 'P' | ('K' << 8) | (5 << 16) | (6 << 24)
 End of central directory record signature.

Properties

static int DefaultCodePage [get, set]
 Default encoding used for string conversion. 0 gives the default system OEM code page. Dont use unicode encodings if you want to be Zip compatible! Using the default code page isnt the full solution neccessarily there are many variable factors, codepage 850 is often a good choice for European users, however be careful about compatability.

Private Member Functions

 ZipConstants ()
 Initialise default instance of ZipConstants

Static Private Attributes

static int defaultCodePage = Thread.CurrentThread.CurrentCulture.TextInfo.OEMCodePage

Detailed Description

This class contains constants used for Zip format files.

Constructor & Destructor Documentation

◆ ZipConstants()

ICSharpCode.SharpZipLib.Zip.ZipConstants.ZipConstants ( )
private

Initialise default instance of ZipConstants

Private to prevent instances being created.

Member Function Documentation

◆ ConvertToArray() [1/2]

byte[] ICSharpCode.SharpZipLib.Zip.ZipConstants.ConvertToArray ( int flags,
string str )
static

Convert a string to a byte array.

Parameters
flagsThe applicable general purpose bits flags
strString to convert to an array
Returns
Converted array
Here is the call graph for this function:

◆ ConvertToArray() [2/2]

byte[] ICSharpCode.SharpZipLib.Zip.ZipConstants.ConvertToArray ( string str)
static

Convert a string to a byte array.

Parameters
strString to convert to an array
Returns
Converted array
Here is the caller graph for this function:

◆ ConvertToString() [1/2]

string ICSharpCode.SharpZipLib.Zip.ZipConstants.ConvertToString ( byte[] data)
static

Convert a byte array to string.

Parameters
dataByte array to convert
Returns
data dataconverted to a string
Here is the call graph for this function:

◆ ConvertToString() [2/2]

string ICSharpCode.SharpZipLib.Zip.ZipConstants.ConvertToString ( byte[] data,
int count )
static

Convert a portion of a byte array to a string.


Parameters
dataData to convert to string
countNumber of bytes to convert starting from index 0
Returns
data[0]..data[length - 1] converted to a string
Here is the caller graph for this function:

◆ ConvertToStringExt() [1/2]

string ICSharpCode.SharpZipLib.Zip.ZipConstants.ConvertToStringExt ( int flags,
byte[] data )
static

Convert a byte array to string.

Parameters
dataByte array to convert
flagsThe applicable general purpose bits flags
Returns
data dataconverted to a string
Here is the call graph for this function:

◆ ConvertToStringExt() [2/2]

string ICSharpCode.SharpZipLib.Zip.ZipConstants.ConvertToStringExt ( int flags,
byte[] data,
int count )
static

Convert a byte array to string.

Parameters
flagsThe applicable general purpose bits flags
dataByte array to convert
countThe number of bytes to convert.
Returns
data dataconverted to a string
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ ArchiveExtraDataSignature

const int ICSharpCode.SharpZipLib.Zip.ZipConstants.ArchiveExtraDataSignature = 'P' | ('K' << 8) | (6 << 16) | (7 << 24)
static

Signature for archive extra data signature (were headers are encrypted).

◆ CENDIGITALSIG

const int ICSharpCode.SharpZipLib.Zip.ZipConstants.CENDIGITALSIG = 'P' | ('K' << 8) | (5 << 16) | (5 << 24)
static

Central header digitial signature.

◆ CENHDR

const int ICSharpCode.SharpZipLib.Zip.ZipConstants.CENHDR = 46
static

Size of central header entry.

◆ CENSIG

const int ICSharpCode.SharpZipLib.Zip.ZipConstants.CENSIG = 'P' | ('K' << 8) | (1 << 16) | (2 << 24)
static

Signature for central header.

◆ CENSIG64

const int ICSharpCode.SharpZipLib.Zip.ZipConstants.CENSIG64 = 'P' | ('K' << 8) | (6 << 16) | (6 << 24)
static

Signature for Zip64 central file header.

◆ CentralHeaderBaseSize

const int ICSharpCode.SharpZipLib.Zip.ZipConstants.CentralHeaderBaseSize = 46
static

Size of central header entry (excluding variable fields)

◆ CentralHeaderDigitalSignature

const int ICSharpCode.SharpZipLib.Zip.ZipConstants.CentralHeaderDigitalSignature = 'P' | ('K' << 8) | (5 << 16) | (5 << 24)
static

Central header digitial signature.

◆ CentralHeaderSignature

const int ICSharpCode.SharpZipLib.Zip.ZipConstants.CentralHeaderSignature = 'P' | ('K' << 8) | (1 << 16) | (2 << 24)
static

Signature for central header.

◆ CRYPTO_HEADER_SIZE

const int ICSharpCode.SharpZipLib.Zip.ZipConstants.CRYPTO_HEADER_SIZE = 12
static

Size of cryptographic header stored before entry data.

◆ CryptoHeaderSize

const int ICSharpCode.SharpZipLib.Zip.ZipConstants.CryptoHeaderSize = 12
static

Size of 'classic' cryptographic header stored before any entry data.

◆ DataDescriptorSignature

const int ICSharpCode.SharpZipLib.Zip.ZipConstants.DataDescriptorSignature = 'P' | ('K' << 8) | (7 << 16) | (8 << 24)
static

Signature for data descriptor.

This is only used where the length, Crc, or compressed size isnt known when the entry is created and the output stream doesnt support seeking. The local entry cannot be 'patched' with the correct values in this case so the values are recorded after the data prefixed by this header, as well as in the central directory.

◆ DataDescriptorSize

const int ICSharpCode.SharpZipLib.Zip.ZipConstants.DataDescriptorSize = 16
static

Size of data descriptor.

◆ defaultCodePage

int ICSharpCode.SharpZipLib.Zip.ZipConstants.defaultCodePage = Thread.CurrentThread.CurrentCulture.TextInfo.OEMCodePage
staticprivate

◆ ENDHDR

const int ICSharpCode.SharpZipLib.Zip.ZipConstants.ENDHDR = 22
static

Size of end of central record (excluding variable fields)

◆ EndOfCentralDirectorySignature

const int ICSharpCode.SharpZipLib.Zip.ZipConstants.EndOfCentralDirectorySignature = 'P' | ('K' << 8) | (5 << 16) | (6 << 24)
static

End of central directory record signature.

◆ EndOfCentralRecordBaseSize

const int ICSharpCode.SharpZipLib.Zip.ZipConstants.EndOfCentralRecordBaseSize = 22
static

Size of end of central record (excluding variable fields)

◆ ENDSIG

const int ICSharpCode.SharpZipLib.Zip.ZipConstants.ENDSIG = 'P' | ('K' << 8) | (5 << 16) | (6 << 24)
static

End of central directory record signature.

◆ EXTHDR

const int ICSharpCode.SharpZipLib.Zip.ZipConstants.EXTHDR = 16
static

Size of data descriptor.

◆ EXTSIG

const int ICSharpCode.SharpZipLib.Zip.ZipConstants.EXTSIG = 'P' | ('K' << 8) | (7 << 16) | (8 << 24)
static

Signature for data descriptor.

This is only used where the length, Crc, or compressed size isnt known when the entry is created and the output stream doesnt support seeking. The local entry cannot be 'patched' with the correct values in this case so the values are recorded after the data prefixed by this header, as well as in the central directory.

◆ LocalHeaderBaseSize

const int ICSharpCode.SharpZipLib.Zip.ZipConstants.LocalHeaderBaseSize = 30
static

Size of local entry header (excluding variable length fields at end)

◆ LocalHeaderSignature

const int ICSharpCode.SharpZipLib.Zip.ZipConstants.LocalHeaderSignature = 'P' | ('K' << 8) | (3 << 16) | (4 << 24)
static

Signature for local entry header.

◆ LOCHDR

const int ICSharpCode.SharpZipLib.Zip.ZipConstants.LOCHDR = 30
static

Size of local entry header (excluding variable length fields at end)

◆ LOCSIG

const int ICSharpCode.SharpZipLib.Zip.ZipConstants.LOCSIG = 'P' | ('K' << 8) | (3 << 16) | (4 << 24)
static

Signature for local entry header.

◆ SPANNINGSIG

const int ICSharpCode.SharpZipLib.Zip.ZipConstants.SPANNINGSIG = 'P' | ('K' << 8) | (7 << 16) | (8 << 24)
static

Signature for spanning entry.

◆ SpanningSignature

const int ICSharpCode.SharpZipLib.Zip.ZipConstants.SpanningSignature = 'P' | ('K' << 8) | (7 << 16) | (8 << 24)
static

Signature for spanning entry.

◆ SpanningTempSignature

const int ICSharpCode.SharpZipLib.Zip.ZipConstants.SpanningTempSignature = 'P' | ('K' << 8) | ('0' << 16) | ('0' << 24)
static

Signature for temporary spanning entry.

◆ SPANTEMPSIG

const int ICSharpCode.SharpZipLib.Zip.ZipConstants.SPANTEMPSIG = 'P' | ('K' << 8) | ('0' << 16) | ('0' << 24)
static

Signature for temporary spanning entry.

◆ VERSION_AES

const int ICSharpCode.SharpZipLib.Zip.ZipConstants.VERSION_AES = 51
static

Version indicating AES encryption.

◆ VERSION_MADE_BY

const int ICSharpCode.SharpZipLib.Zip.ZipConstants.VERSION_MADE_BY = 51
static

The version made by field for entries in the central header when created by this library.

This is also the Zip version for the library when comparing against the version required to extract for an entry. See ZipInputStream.CanDecompressEntry.

◆ VERSION_STRONG_ENCRYPTION

const int ICSharpCode.SharpZipLib.Zip.ZipConstants.VERSION_STRONG_ENCRYPTION = 50
static

The minimum version required to support strong encryption.

◆ VersionMadeBy

const int ICSharpCode.SharpZipLib.Zip.ZipConstants.VersionMadeBy = 51
static

The version made by field for entries in the central header when created by this library.

This is also the Zip version for the library when comparing against the version required to extract for an entry. See ZipEntry.CanDecompress.

◆ VersionStrongEncryption

const int ICSharpCode.SharpZipLib.Zip.ZipConstants.VersionStrongEncryption = 50
static

The minimum version required to support strong encryption.

◆ VersionZip64

const int ICSharpCode.SharpZipLib.Zip.ZipConstants.VersionZip64 = 45
static

The version required for Zip64 extensions (4.5 or higher)

◆ Zip64CentralDirLocatorSignature

const int ICSharpCode.SharpZipLib.Zip.ZipConstants.Zip64CentralDirLocatorSignature = 'P' | ('K' << 8) | (6 << 16) | (7 << 24)
static

Signature for Zip64 central directory locator.

◆ Zip64CentralFileHeaderSignature

const int ICSharpCode.SharpZipLib.Zip.ZipConstants.Zip64CentralFileHeaderSignature = 'P' | ('K' << 8) | (6 << 16) | (6 << 24)
static

Signature for Zip64 central file header.

◆ Zip64DataDescriptorSize

const int ICSharpCode.SharpZipLib.Zip.ZipConstants.Zip64DataDescriptorSize = 24
static

Size of Zip64 data descriptor.

Property Documentation

◆ DefaultCodePage

int ICSharpCode.SharpZipLib.Zip.ZipConstants.DefaultCodePage
staticgetset

Default encoding used for string conversion. 0 gives the default system OEM code page. Dont use unicode encodings if you want to be Zip compatible! Using the default code page isnt the full solution neccessarily there are many variable factors, codepage 850 is often a good choice for European users, however be careful about compatability.


The documentation for this class was generated from the following file: