2362N/A * Copyright (c) 2001, 2008, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 2362N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 2362N/A * by Oracle in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 0N/A#
endif // End of ZLIB 0N/A ((((a) <<
8) &
0xff00) |
0x00ff) & (((a) >>
8) |
0xff00)
0N/A// Write data to the ZIP output stream. 0N/A exit(
1);
// Called only from the native standalone unpacker 0N/A // flags 02 = maximum sub-compression flag 0N/A // Compression method 8=deflate. 0N/A // Last modified date and time. 0N/A // Compressed length: 0N/A // Uncompressed length. 0N/A // So called "extra field" length. 0N/A // So called "comment" length. 0N/A // Disk number start 0N/A // File flags => binary 0N/A // Offset within ZIP file. 0N/A // Copy the whole thing into the central directory. 0N/A // Copy the fname to the header. 0N/A // flags 02 = maximum sub-compression flag 0N/A // Compression method = deflate 0N/A // Last modified date and time. 0N/A // Compressed length: 0N/A // Uncompressed length. 0N/A // So called "extra field" length. 0N/A // Write the LOC header to the output file. 0N/A // Copy the fname to the header. 0N/A // Create the End of Central Directory structure. 0N/A // Number of entries in central directory. 0N/A // Size of the central directory} 0N/A // Offset of central directory within disk. 0N/A // zipfile comment length; 0N/A // Write the central directory. 0N/A // Write the End of Central Directory structure. 0N/A // Write the comment. 0N/A// Open a Jar file and initialize. 0N/A exit(
3);
// Called only from the native standalone unpacker 0N/A// Add a ZIP entry and copy the file data 0N/A// Add a ZIP entry for a directory name no data 0N/A// Write out the central directory and close the jar file. 0N/A/* Convert the date y/n/d and time h:m:s to a four byte DOS date and 0N/A * time (date in high two bytes, time in low two bytes allowing magnitude 0N/A * Return the Unix time in DOS format 0N/A //printf("modtime %d => %d\n", modtime_cache, dostime_cache); 0N/A/* Returns true on success, and will set the clen to the compressed 0N/A length, the caller should verify if true and clen less than the 0N/A // NOTE: the window size should always be -MAX_WBITS normally -15. 494N/A PRINTCR((
2,
"Error: deflate error : Invalid compression level \n"));
0N/A// Callback for fetching data from a GZIP input stream 0N/A // skip 8-byte trailer 0N/A // Bug: 5023768,we read past the TRAILER_LEN to see if there is 0N/A // any extraneous data, as we dont support concatenated .gz 0N/A // %%% should check final CRC and length here 0N/A // %%% should check for concatenated *.gz files here 0N/A u->
abort(
"garbage after end of deflated input stream");
0N/A // pop this filter off: 0N/A //fprintf(u->errstrm, "readInputFn(%d,%d) => %d (gunzip)\n", 0N/A // (int)minlen, (int)maxlen, (int)numread); 0N/A // do not save extra, name, comment 0N/A // now the input stream is ready to read into the inflater