ICSharpCode::SharpZipLib::Zip::ZipConstants Class Reference

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

List of all members.

Static Public Member Functions

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

Public Attributes

const int VERSION_MADE_BY = 20
 The version made by field for entries in the central header when created by this library.
const int VERSION_STRONG_ENCRYPTION = 50
 The minimum version required to support strong encryption.
const int LOCHDR = 30
 Size of local entry header (excluding variable length fields at end).
const int LOCSIG = 'P' | ('K' << 8) | (3 << 16) | (4 << 24)
 Signature for local entry header.
const int LOCVER = 4
 Offset of version to extract in local entry header.
const int LOCFLG = 6
 Offset of general purpose flags in local entry header.
const int LOCHOW = 8
 Offset of compression method in local entry header.
const int LOCTIM = 10
 Offset of last mod file time + date in local entry header.
const int LOCCRC = 14
 Offset of crc-32 in local entry header.
const int LOCSIZ = 18
 Offset of compressed size in local entry header.
const int LOCLEN = 22
 Offset of uncompressed size in local entry header.
const int LOCNAM = 26
 Offset of file name length in local entry header.
const int LOCEXT = 28
 Offset of extra field length in local entry header.
const int SPANNINGSIG = 'P' | ('K' << 8) | (7 << 16) | (8 << 24)
 Signature for spanning entry.
const int SPANTEMPSIG = 'P' | ('K' << 8) | ('0' << 16) | ('0' << 24)
 Signature for temporary spanning entry.
const int EXTSIG = 'P' | ('K' << 8) | (7 << 16) | (8 << 24)
 Signature for data descriptor.
const int EXTHDR = 16
 Size of data descriptor.
const int EXTCRC = 4
 Offset of crc-32 in data descriptor.
const int EXTSIZ = 8
 Offset of compressed size in data descriptor.
const int EXTLEN = 12
 Offset of uncompressed length in data descriptor.
const int CENSIG = 'P' | ('K' << 8) | (1 << 16) | (2 << 24)
 Signature for central header.
const int CENHDR = 46
 Size of central header entry.
const int CENVEM = 4
 Offset of version made by in central file header.
const int CENVER = 6
 Offset of version needed to extract in central file header.
const int CENFLG = 8
 Offset of general purpose bit flag in central file header.
const int CENHOW = 10
 Offset of compression method in central file header.
const int CENTIM = 12
 Offset of time/date in central file header.
const int CENCRC = 16
 Offset of crc-32 in central file header.
const int CENSIZ = 20
 Offset of compressed size in central file header.
const int CENLEN = 24
 Offset of uncompressed size in central file header.
const int CENNAM = 28
 Offset of file name length in central file header.
const int CENEXT = 30
 Offset of extra field length in central file header.
const int CENCOM = 32
 Offset of file comment length in central file header.
const int CENDSK = 34
 Offset of disk start number in central file header.
const int CENATT = 36
 Offset of internal file attributes in central file header.
const int CENATX = 38
 Offset of external file attributes in central file header.
const int CENOFF = 42
 Offset of relative offset of local header in central file header.
const int CENSIG64 = 'P' | ('K' << 8) | (6 << 16) | (6 << 24)
 Signature for Zip64 central file header.
const int CENDIGITALSIG = 'P' | ('K' << 8) | (5 << 16) | (5 << 24)
 Central header digitial signature.
const int ENDSIG = 'P' | ('K' << 8) | (5 << 16) | (6 << 24)
 End of central directory record signature.
const int ENDHDR = 22
 Size of end of central record (excluding variable fields).
const int ENDNRD = 4
 Offset of number of this disk.
const int ENDDCD = 6
 Offset of number of disk with start of central directory.
const int ENDSUB = 8
 Offset of number of entries in the central directory of this disk.
const int ENDTOT = 10
 Offset of total number of entries in the central directory.
const int ENDSIZ = 12
 Offset of size of central directory.
const int ENDOFF = 16
 Offset of offset of start of central directory with respect to starting disk number.
const int ENDCOM = 20
 Offset of ZIP file comment length.
const int CRYPTO_HEADER_SIZE = 12
 Size of cryptographic header stored before entry data.

Properties

static int DefaultCodePage
 Default encoding used for string conversion. 0 gives the default system Ansi 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.

Static Private Attributes

static int defaultCodePage = 0


Detailed Description

This class contains constants used for Zip format files.

Definition at line 123 of file ZipConstants.cs.


Member Function Documentation

static byte [] ICSharpCode::SharpZipLib::Zip::ZipConstants::ConvertToArray string  str  )  [inline, static]
 

Convert a string to a byte array.

Parameters:
str String to convert to an array
Returns:
Converted array

Definition at line 456 of file ZipConstants.cs.

static string ICSharpCode::SharpZipLib::Zip::ZipConstants::ConvertToString byte[]  data  )  [inline, static]
 

Convert byte array to string.

Parameters:
data Byte array to convert
Returns:

converted to a string

Definition at line 444 of file ZipConstants.cs.

static string ICSharpCode::SharpZipLib::Zip::ZipConstants::ConvertToString byte[]  data,
int  length
[inline, static]
 

Convert a portion of a byte array to a string.

Parameters:
data Data to convert to string
length Number of bytes to convert starting from index 0
Returns:
data[0]..data[length - 1] converted to a string

Definition at line 426 of file ZipConstants.cs.


Member Data Documentation

const int ICSharpCode::SharpZipLib::Zip::ZipConstants::CENATT = 36
 

Offset of internal file attributes in central file header.

Definition at line 312 of file ZipConstants.cs.

const int ICSharpCode::SharpZipLib::Zip::ZipConstants::CENATX = 38
 

Offset of external file attributes in central file header.

Definition at line 317 of file ZipConstants.cs.

const int ICSharpCode::SharpZipLib::Zip::ZipConstants::CENCOM = 32
 

Offset of file comment length in central file header.

Definition at line 302 of file ZipConstants.cs.

const int ICSharpCode::SharpZipLib::Zip::ZipConstants::CENCRC = 16
 

Offset of crc-32 in central file header.

Definition at line 277 of file ZipConstants.cs.

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

Central header digitial signature.

Definition at line 335 of file ZipConstants.cs.

const int ICSharpCode::SharpZipLib::Zip::ZipConstants::CENDSK = 34
 

Offset of disk start number in central file header.

Definition at line 307 of file ZipConstants.cs.

const int ICSharpCode::SharpZipLib::Zip::ZipConstants::CENEXT = 30
 

Offset of extra field length in central file header.

Definition at line 297 of file ZipConstants.cs.

const int ICSharpCode::SharpZipLib::Zip::ZipConstants::CENFLG = 8
 

Offset of general purpose bit flag in central file header.

Definition at line 262 of file ZipConstants.cs.

const int ICSharpCode::SharpZipLib::Zip::ZipConstants::CENHDR = 46
 

Size of central header entry.

Definition at line 247 of file ZipConstants.cs.

const int ICSharpCode::SharpZipLib::Zip::ZipConstants::CENHOW = 10
 

Offset of compression method in central file header.

Definition at line 267 of file ZipConstants.cs.

const int ICSharpCode::SharpZipLib::Zip::ZipConstants::CENLEN = 24
 

Offset of uncompressed size in central file header.

Definition at line 287 of file ZipConstants.cs.

const int ICSharpCode::SharpZipLib::Zip::ZipConstants::CENNAM = 28
 

Offset of file name length in central file header.

Definition at line 292 of file ZipConstants.cs.

const int ICSharpCode::SharpZipLib::Zip::ZipConstants::CENOFF = 42
 

Offset of relative offset of local header in central file header.

Definition at line 322 of file ZipConstants.cs.

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

Signature for central header.

Definition at line 242 of file ZipConstants.cs.

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

Signature for Zip64 central file header.

Definition at line 328 of file ZipConstants.cs.

const int ICSharpCode::SharpZipLib::Zip::ZipConstants::CENSIZ = 20
 

Offset of compressed size in central file header.

Definition at line 282 of file ZipConstants.cs.

const int ICSharpCode::SharpZipLib::Zip::ZipConstants::CENTIM = 12
 

Offset of time/date in central file header.

Definition at line 272 of file ZipConstants.cs.

const int ICSharpCode::SharpZipLib::Zip::ZipConstants::CENVEM = 4
 

Offset of version made by in central file header.

Definition at line 252 of file ZipConstants.cs.

const int ICSharpCode::SharpZipLib::Zip::ZipConstants::CENVER = 6
 

Offset of version needed to extract in central file header.

Definition at line 257 of file ZipConstants.cs.

const int ICSharpCode::SharpZipLib::Zip::ZipConstants::CRYPTO_HEADER_SIZE = 12
 

Size of cryptographic header stored before entry data.

Definition at line 390 of file ZipConstants.cs.

int ICSharpCode::SharpZipLib::Zip::ZipConstants::defaultCodePage = 0 [static, private]
 

Definition at line 395 of file ZipConstants.cs.

const int ICSharpCode::SharpZipLib::Zip::ZipConstants::ENDCOM = 20
 

Offset of ZIP file comment length.

Definition at line 385 of file ZipConstants.cs.

const int ICSharpCode::SharpZipLib::Zip::ZipConstants::ENDDCD = 6
 

Offset of number of disk with start of central directory.

Definition at line 360 of file ZipConstants.cs.

const int ICSharpCode::SharpZipLib::Zip::ZipConstants::ENDHDR = 22
 

Size of end of central record (excluding variable fields).

Definition at line 348 of file ZipConstants.cs.

const int ICSharpCode::SharpZipLib::Zip::ZipConstants::ENDNRD = 4
 

Offset of number of this disk.

Definition at line 355 of file ZipConstants.cs.

const int ICSharpCode::SharpZipLib::Zip::ZipConstants::ENDOFF = 16
 

Offset of offset of start of central directory with respect to starting disk number.

Definition at line 380 of file ZipConstants.cs.

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

End of central directory record signature.

Definition at line 343 of file ZipConstants.cs.

const int ICSharpCode::SharpZipLib::Zip::ZipConstants::ENDSIZ = 12
 

Offset of size of central directory.

Definition at line 375 of file ZipConstants.cs.

const int ICSharpCode::SharpZipLib::Zip::ZipConstants::ENDSUB = 8
 

Offset of number of entries in the central directory of this disk.

Definition at line 365 of file ZipConstants.cs.

const int ICSharpCode::SharpZipLib::Zip::ZipConstants::ENDTOT = 10
 

Offset of total number of entries in the central directory.

Definition at line 370 of file ZipConstants.cs.

const int ICSharpCode::SharpZipLib::Zip::ZipConstants::EXTCRC = 4
 

Offset of crc-32 in data descriptor.

Definition at line 226 of file ZipConstants.cs.

const int ICSharpCode::SharpZipLib::Zip::ZipConstants::EXTHDR = 16
 

Size of data descriptor.

Definition at line 221 of file ZipConstants.cs.

const int ICSharpCode::SharpZipLib::Zip::ZipConstants::EXTLEN = 12
 

Offset of uncompressed length in data descriptor.

Definition at line 236 of file ZipConstants.cs.

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

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.

Definition at line 216 of file ZipConstants.cs.

const int ICSharpCode::SharpZipLib::Zip::ZipConstants::EXTSIZ = 8
 

Offset of compressed size in data descriptor.

Definition at line 231 of file ZipConstants.cs.

const int ICSharpCode::SharpZipLib::Zip::ZipConstants::LOCCRC = 14
 

Offset of crc-32 in local entry header.

Definition at line 174 of file ZipConstants.cs.

const int ICSharpCode::SharpZipLib::Zip::ZipConstants::LOCEXT = 28
 

Offset of extra field length in local entry header.

Definition at line 194 of file ZipConstants.cs.

const int ICSharpCode::SharpZipLib::Zip::ZipConstants::LOCFLG = 6
 

Offset of general purpose flags in local entry header.

Definition at line 159 of file ZipConstants.cs.

const int ICSharpCode::SharpZipLib::Zip::ZipConstants::LOCHDR = 30
 

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

Definition at line 144 of file ZipConstants.cs.

const int ICSharpCode::SharpZipLib::Zip::ZipConstants::LOCHOW = 8
 

Offset of compression method in local entry header.

Definition at line 164 of file ZipConstants.cs.

const int ICSharpCode::SharpZipLib::Zip::ZipConstants::LOCLEN = 22
 

Offset of uncompressed size in local entry header.

Definition at line 184 of file ZipConstants.cs.

const int ICSharpCode::SharpZipLib::Zip::ZipConstants::LOCNAM = 26
 

Offset of file name length in local entry header.

Definition at line 189 of file ZipConstants.cs.

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

Signature for local entry header.

Definition at line 149 of file ZipConstants.cs.

const int ICSharpCode::SharpZipLib::Zip::ZipConstants::LOCSIZ = 18
 

Offset of compressed size in local entry header.

Definition at line 179 of file ZipConstants.cs.

const int ICSharpCode::SharpZipLib::Zip::ZipConstants::LOCTIM = 10
 

Offset of last mod file time + date in local entry header.

Definition at line 169 of file ZipConstants.cs.

const int ICSharpCode::SharpZipLib::Zip::ZipConstants::LOCVER = 4
 

Offset of version to extract in local entry header.

Definition at line 154 of file ZipConstants.cs.

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

Signature for spanning entry.

Definition at line 200 of file ZipConstants.cs.

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

Signature for temporary spanning entry.

Definition at line 205 of file ZipConstants.cs.

const int ICSharpCode::SharpZipLib::Zip::ZipConstants::VERSION_MADE_BY = 20
 

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::CanDecompressEntryZipInputStream.CanDecompressEntry.

Definition at line 132 of file ZipConstants.cs.

const int ICSharpCode::SharpZipLib::Zip::ZipConstants::VERSION_STRONG_ENCRYPTION = 50
 

The minimum version required to support strong encryption.

Definition at line 137 of file ZipConstants.cs.


Property Documentation

int ICSharpCode::SharpZipLib::Zip::ZipConstants::DefaultCodePage [static, get, set]
 

Default encoding used for string conversion. 0 gives the default system Ansi 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.

Definition at line 404 of file ZipConstants.cs.


The documentation for this class was generated from the following file:
Generated on Fri Jun 23 21:50:06 2006 for OblivionModTranslator by  doxygen 1.4.6-NO