Overview | Module | Use | Devguide | Index

Constants | Constants' Details

:: com :: sun :: star :: packages :: zip ::
constants group ZipConstants
Description defines the constants used by the ZIP interfaces.

Constants
DEFLATED | Compression method for the deflate algorithm (the only one currently supported).
NO_COMPRESSION | Compression level for no compression.
BEST_SPEED | Compression level for fastest compression
BEST_COMPRESSION | Compression level for best compression
DEFAULT_COMPRESSION | Default compression level.
FILTERED | Compression strategy best used for data consisting mostly of small values with a somewhat random distribution. Forces more Huffman coding and less string matching.
HUFFMAN_ONLY | Compression strategy for Huffman coding only.
DEFAULT_STRATEGY | Default compression strategy
STORED | entry is uncompressed
DEF_MEM_LEVEL | entry is uncompressed
LOCSIG | Header Signature: "PK\003\004"
EXTSIG | Header Signature: "PK\007\008"
CENSIG | Header Signature: "PK\001\002"
ENDSIG | Header Signature: "PK\005\006"
SPANSIG | Header Signature: "PK\007\008"
LOCHDR | LOC header size in bytes (including signatures)
EXTHDR | EXT header size in bytes (including signatures)
CENHDR | CEN header size in bytes (including signatures)
ENDHDR | END header size in bytes (including signatures)
LOCVER | LOC header field "version needed to extract" offset
LOCFLG | LOC header field "general purpose bit flags" offset
LOCHOW | LOC header field "compression method" offset
LOCTIM | LOC header field "modification time" offset
LOCCRC | LOC header field "crc of uncompressed data" offset
LOCSIZ | LOC header field "compressed data size" offset
LOCLEN | LOC header field "uncompressed data size" offset
LOCNAM | LOC header field "filename length" offset
LOCEXT | LOC header field "extra field length" offset
EXTCRC | EXT header field "crc of uncompressed data" offsets
EXTSIZ | EXT header field "compressed size" offsets
EXTLEN | EXT header field "uncompressed size" offsets
CENVEM | CEN header field "version made by" offset
CENVER | CEN header field "version needed to extract" offset
CENFLG | CEN header field "general purpose bit flags" offset
CENHOW | CEN header field "compression method" offset
CENTIM | CEN header field "modification time" offset
CENDAT | CEN header field "modification time" offset
CENCRC | CEN header field "crc of uncompressed data" offset
CENSIZ | CEN header field "compressed size" offset
CENLEN | CEN header field "uncompressed size" offset
CENNAM | CEN header field "length of filename" offset
CENEXT | CEN header field "length of extra field" offset
CENCOM | CEN header field "file comment length" offset
CENDSK | CEN header field "disk number start" offset
CENATT | CEN header field "internal file attributes" offset
CENATX | CEN header field "external file attributes" offset
CENOFF | CEN header field "offset of local header" offset
ENDSUB | END header field "number of entries on this disk" offset
ENDTOT | END header field "total number of entries" offset
ENDSIZ | END header field "central directory size" offset
ENDOFF | END header field "central directory offset" offset
ENDCOM | END header field "size of zip file comment" offset

Constants' Details
DEFLATED
const short DEFLATED = 8; Description Compression method for the deflate algorithm (the only one currently supported).
NO_COMPRESSION
const short NO_COMPRESSION = 0; Description Compression level for no compression.
BEST_SPEED
const short BEST_SPEED = 1; Description Compression level for fastest compression
BEST_COMPRESSION
const short BEST_COMPRESSION = 9; Description Compression level for best compression
DEFAULT_COMPRESSION
const short DEFAULT_COMPRESSION = -1; Description Default compression level.
FILTERED
const short FILTERED = 1; Description Compression strategy best used for data consisting mostly of small values with a somewhat random distribution. Forces more Huffman coding and less string matching.
HUFFMAN_ONLY
const short HUFFMAN_ONLY = 2; Description Compression strategy for Huffman coding only.
DEFAULT_STRATEGY
const short DEFAULT_STRATEGY = 0; Description Default compression strategy
STORED
const short STORED = 0; Description entry is uncompressed
DEF_MEM_LEVEL
const short DEF_MEM_LEVEL = 8; Description entry is uncompressed
LOCSIG
const long LOCSIG = 0x04034b50; Description Header Signature: "PK\003\004"
EXTSIG
const long EXTSIG = 0x08074b50; Description Header Signature: "PK\007\008"
CENSIG
const long CENSIG = 0x02014b50; Description Header Signature: "PK\001\002"
ENDSIG
const long ENDSIG = 0x06054b50; Description Header Signature: "PK\005\006"
SPANSIG
const long SPANSIG = 0x08074b50; Description Header Signature: "PK\007\008"
LOCHDR
const short LOCHDR = 30; Description LOC header size in bytes (including signatures)
EXTHDR
const short EXTHDR = 16; Description EXT header size in bytes (including signatures)
CENHDR
const short CENHDR = 46; Description CEN header size in bytes (including signatures)
ENDHDR
const short ENDHDR = 22; Description END header size in bytes (including signatures)
LOCVER
const short LOCVER = 4; Description LOC header field "version needed to extract" offset
LOCFLG
const short LOCFLG = 6; Description LOC header field "general purpose bit flags" offset
LOCHOW
const short LOCHOW = 8; Description LOC header field "compression method" offset
LOCTIM
const short LOCTIM = 10; Description LOC header field "modification time" offset
LOCCRC
const short LOCCRC = 14; Description LOC header field "crc of uncompressed data" offset
LOCSIZ
const short LOCSIZ = 18; Description LOC header field "compressed data size" offset
LOCLEN
const short LOCLEN = 22; Description LOC header field "uncompressed data size" offset
LOCNAM
const short LOCNAM = 26; Description LOC header field "filename length" offset
LOCEXT
const short LOCEXT = 28; Description LOC header field "extra field length" offset
EXTCRC
const short EXTCRC = 4; Description EXT header field "crc of uncompressed data" offsets
EXTSIZ
const short EXTSIZ = 8; Description EXT header field "compressed size" offsets
EXTLEN
const short EXTLEN = 12; Description EXT header field "uncompressed size" offsets
CENVEM
const short CENVEM = 4; Description CEN header field "version made by" offset
CENVER
const short CENVER = 6; Description CEN header field "version needed to extract" offset
CENFLG
const short CENFLG = 8; Description CEN header field "general purpose bit flags" offset
CENHOW
const short CENHOW = 10; Description CEN header field "compression method" offset
CENTIM
const short CENTIM = 12; Description CEN header field "modification time" offset
CENDAT
const short CENDAT = 14; Description CEN header field "modification time" offset
CENCRC
const short CENCRC = 16; Description CEN header field "crc of uncompressed data" offset
CENSIZ
const short CENSIZ = 20; Description CEN header field "compressed size" offset
CENLEN
const short CENLEN = 24; Description CEN header field "uncompressed size" offset
CENNAM
const short CENNAM = 28; Description CEN header field "length of filename" offset
CENEXT
const short CENEXT = 30; Description CEN header field "length of extra field" offset
CENCOM
const short CENCOM = 32; Description CEN header field "file comment length" offset
CENDSK
const short CENDSK = 34; Description CEN header field "disk number start" offset
CENATT
const short CENATT = 36; Description CEN header field "internal file attributes" offset
CENATX
const short CENATX = 38; Description CEN header field "external file attributes" offset
CENOFF
const short CENOFF = 42; Description CEN header field "offset of local header" offset
ENDSUB
const short ENDSUB = 8; Description END header field "number of entries on this disk" offset
ENDTOT
const short ENDTOT = 10; Description END header field "total number of entries" offset
ENDSIZ
const short ENDSIZ = 12; Description END header field "central directory size" offset
ENDOFF
const short ENDOFF = 16; Description END header field "central directory offset" offset
ENDCOM
const short ENDCOM = 20; Description END header field "size of zip file comment" offset

Top of Page

Copyright © 2003 Sun Microsystems, Inc.