jaroslav@609: /* jaroslav@609: * Copyright (c) 1995, 1996, Oracle and/or its affiliates. All rights reserved. jaroslav@609: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. jaroslav@609: * jaroslav@609: * This code is free software; you can redistribute it and/or modify it jaroslav@609: * under the terms of the GNU General Public License version 2 only, as jaroslav@609: * published by the Free Software Foundation. Oracle designates this jaroslav@609: * particular file as subject to the "Classpath" exception as provided jaroslav@609: * by Oracle in the LICENSE file that accompanied this code. jaroslav@609: * jaroslav@609: * This code is distributed in the hope that it will be useful, but WITHOUT jaroslav@609: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or jaroslav@609: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License jaroslav@609: * version 2 for more details (a copy is included in the LICENSE file that jaroslav@609: * accompanied this code). jaroslav@609: * jaroslav@609: * You should have received a copy of the GNU General Public License version jaroslav@609: * 2 along with this work; if not, write to the Free Software Foundation, jaroslav@609: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. jaroslav@609: * jaroslav@609: * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA jaroslav@609: * or visit www.oracle.com if you need additional information or have any jaroslav@609: * questions. jaroslav@609: */ jaroslav@609: jaroslav@694: package org.apidesign.bck2brwsr.emul.zip; jaroslav@609: jaroslav@609: /* jaroslav@609: * This class defines the constants that are used by the classes jaroslav@609: * which manipulate Zip64 files. jaroslav@609: */ jaroslav@609: jaroslav@694: public class ZipConstants64 { jaroslav@609: jaroslav@609: /* jaroslav@609: * ZIP64 constants jaroslav@609: */ jaroslav@609: static final long ZIP64_ENDSIG = 0x06064b50L; // "PK\006\006" jaroslav@609: static final long ZIP64_LOCSIG = 0x07064b50L; // "PK\006\007" jaroslav@609: static final int ZIP64_ENDHDR = 56; // ZIP64 end header size jaroslav@609: static final int ZIP64_LOCHDR = 20; // ZIP64 end loc header size jaroslav@609: static final int ZIP64_EXTHDR = 24; // EXT header size jaroslav@609: static final int ZIP64_EXTID = 0x0001; // Extra field Zip64 header ID jaroslav@609: jaroslav@609: static final int ZIP64_MAGICCOUNT = 0xFFFF; jaroslav@609: static final long ZIP64_MAGICVAL = 0xFFFFFFFFL; jaroslav@609: jaroslav@609: /* jaroslav@609: * Zip64 End of central directory (END) header field offsets jaroslav@609: */ jaroslav@609: static final int ZIP64_ENDLEN = 4; // size of zip64 end of central dir jaroslav@609: static final int ZIP64_ENDVEM = 12; // version made by jaroslav@609: static final int ZIP64_ENDVER = 14; // version needed to extract jaroslav@609: static final int ZIP64_ENDNMD = 16; // number of this disk jaroslav@609: static final int ZIP64_ENDDSK = 20; // disk number of start jaroslav@609: static final int ZIP64_ENDTOD = 24; // total number of entries on this disk jaroslav@609: static final int ZIP64_ENDTOT = 32; // total number of entries jaroslav@609: static final int ZIP64_ENDSIZ = 40; // central directory size in bytes jaroslav@609: static final int ZIP64_ENDOFF = 48; // offset of first CEN header jaroslav@609: static final int ZIP64_ENDEXT = 56; // zip64 extensible data sector jaroslav@609: jaroslav@609: /* jaroslav@609: * Zip64 End of central directory locator field offsets jaroslav@609: */ jaroslav@609: static final int ZIP64_LOCDSK = 4; // disk number start jaroslav@609: static final int ZIP64_LOCOFF = 8; // offset of zip64 end jaroslav@609: static final int ZIP64_LOCTOT = 16; // total number of disks jaroslav@609: jaroslav@609: /* jaroslav@609: * Zip64 Extra local (EXT) header field offsets jaroslav@609: */ jaroslav@609: static final int ZIP64_EXTCRC = 4; // uncompressed file crc-32 value jaroslav@609: static final int ZIP64_EXTSIZ = 8; // compressed size, 8-byte jaroslav@609: static final int ZIP64_EXTLEN = 16; // uncompressed size, 8-byte jaroslav@609: jaroslav@609: /* jaroslav@609: * Language encoding flag EFS jaroslav@609: */ jaroslav@609: static final int EFS = 0x800; // If this bit is set the filename and jaroslav@609: // comment fields for this file must be jaroslav@609: // encoded using UTF-8. jaroslav@609: jaroslav@609: private ZipConstants64() {} jaroslav@609: }