rt/emul/mini/src/main/java/org/apidesign/bck2brwsr/emul/zip/ZipConstants64.java
author Jaroslav Tulach <jaroslav.tulach@apidesign.org>
Tue, 26 Feb 2013 16:54:16 +0100
changeset 772 d382dacfd73f
parent 694 emul/mini/src/main/java/org/apidesign/bck2brwsr/emul/zip/ZipConstants64.java@0d277415ed02
permissions -rw-r--r--
Moving modules around so the runtime is under one master pom and can be built without building other modules that are in the repository
jaroslav@609
     1
/*
jaroslav@609
     2
 * Copyright (c) 1995, 1996, Oracle and/or its affiliates. All rights reserved.
jaroslav@609
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
jaroslav@609
     4
 *
jaroslav@609
     5
 * This code is free software; you can redistribute it and/or modify it
jaroslav@609
     6
 * under the terms of the GNU General Public License version 2 only, as
jaroslav@609
     7
 * published by the Free Software Foundation.  Oracle designates this
jaroslav@609
     8
 * particular file as subject to the "Classpath" exception as provided
jaroslav@609
     9
 * by Oracle in the LICENSE file that accompanied this code.
jaroslav@609
    10
 *
jaroslav@609
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
jaroslav@609
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
jaroslav@609
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
jaroslav@609
    14
 * version 2 for more details (a copy is included in the LICENSE file that
jaroslav@609
    15
 * accompanied this code).
jaroslav@609
    16
 *
jaroslav@609
    17
 * You should have received a copy of the GNU General Public License version
jaroslav@609
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
jaroslav@609
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
jaroslav@609
    20
 *
jaroslav@609
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
jaroslav@609
    22
 * or visit www.oracle.com if you need additional information or have any
jaroslav@609
    23
 * questions.
jaroslav@609
    24
 */
jaroslav@609
    25
jaroslav@694
    26
package org.apidesign.bck2brwsr.emul.zip;
jaroslav@609
    27
jaroslav@609
    28
/*
jaroslav@609
    29
 * This class defines the constants that are used by the classes
jaroslav@609
    30
 * which manipulate Zip64 files.
jaroslav@609
    31
 */
jaroslav@609
    32
jaroslav@694
    33
public class ZipConstants64 {
jaroslav@609
    34
jaroslav@609
    35
    /*
jaroslav@609
    36
     * ZIP64 constants
jaroslav@609
    37
     */
jaroslav@609
    38
    static final long ZIP64_ENDSIG = 0x06064b50L;  // "PK\006\006"
jaroslav@609
    39
    static final long ZIP64_LOCSIG = 0x07064b50L;  // "PK\006\007"
jaroslav@609
    40
    static final int  ZIP64_ENDHDR = 56;           // ZIP64 end header size
jaroslav@609
    41
    static final int  ZIP64_LOCHDR = 20;           // ZIP64 end loc header size
jaroslav@609
    42
    static final int  ZIP64_EXTHDR = 24;           // EXT header size
jaroslav@609
    43
    static final int  ZIP64_EXTID  = 0x0001;       // Extra field Zip64 header ID
jaroslav@609
    44
jaroslav@609
    45
    static final int  ZIP64_MAGICCOUNT = 0xFFFF;
jaroslav@609
    46
    static final long ZIP64_MAGICVAL = 0xFFFFFFFFL;
jaroslav@609
    47
jaroslav@609
    48
    /*
jaroslav@609
    49
     * Zip64 End of central directory (END) header field offsets
jaroslav@609
    50
     */
jaroslav@609
    51
    static final int  ZIP64_ENDLEN = 4;       // size of zip64 end of central dir
jaroslav@609
    52
    static final int  ZIP64_ENDVEM = 12;      // version made by
jaroslav@609
    53
    static final int  ZIP64_ENDVER = 14;      // version needed to extract
jaroslav@609
    54
    static final int  ZIP64_ENDNMD = 16;      // number of this disk
jaroslav@609
    55
    static final int  ZIP64_ENDDSK = 20;      // disk number of start
jaroslav@609
    56
    static final int  ZIP64_ENDTOD = 24;      // total number of entries on this disk
jaroslav@609
    57
    static final int  ZIP64_ENDTOT = 32;      // total number of entries
jaroslav@609
    58
    static final int  ZIP64_ENDSIZ = 40;      // central directory size in bytes
jaroslav@609
    59
    static final int  ZIP64_ENDOFF = 48;      // offset of first CEN header
jaroslav@609
    60
    static final int  ZIP64_ENDEXT = 56;      // zip64 extensible data sector
jaroslav@609
    61
jaroslav@609
    62
    /*
jaroslav@609
    63
     * Zip64 End of central directory locator field offsets
jaroslav@609
    64
     */
jaroslav@609
    65
    static final int  ZIP64_LOCDSK = 4;       // disk number start
jaroslav@609
    66
    static final int  ZIP64_LOCOFF = 8;       // offset of zip64 end
jaroslav@609
    67
    static final int  ZIP64_LOCTOT = 16;      // total number of disks
jaroslav@609
    68
jaroslav@609
    69
    /*
jaroslav@609
    70
     * Zip64 Extra local (EXT) header field offsets
jaroslav@609
    71
     */
jaroslav@609
    72
    static final int  ZIP64_EXTCRC = 4;       // uncompressed file crc-32 value
jaroslav@609
    73
    static final int  ZIP64_EXTSIZ = 8;       // compressed size, 8-byte
jaroslav@609
    74
    static final int  ZIP64_EXTLEN = 16;      // uncompressed size, 8-byte
jaroslav@609
    75
jaroslav@609
    76
    /*
jaroslav@609
    77
     * Language encoding flag EFS
jaroslav@609
    78
     */
jaroslav@609
    79
    static final int EFS = 0x800;       // If this bit is set the filename and
jaroslav@609
    80
                                        // comment fields for this file must be
jaroslav@609
    81
                                        // encoded using UTF-8.
jaroslav@609
    82
jaroslav@609
    83
    private ZipConstants64() {}
jaroslav@609
    84
}