1592N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1592N/A * This code is free software; you can redistribute it and/or modify it 1592N/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 1592N/A * particular file as subject to the "Classpath" exception as provided 2362N/A * by Oracle in the LICENSE file that accompanied this code. 1592N/A * This code is distributed in the hope that it will be useful, but WITHOUT 1592N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 1592N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 1592N/A * version 2 for more details (a copy is included in the LICENSE file that 1592N/A * You should have received a copy of the GNU General Public License version 1592N/A * 2 along with this work; if not, write to the Free Software Foundation, 1592N/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 1592N/A * Copyright (C) 1995-2003 Jean-loup Gailly. 1592N/A * For conditions of distribution and use, see copyright notice in zlib.h 1592N/A/* =========================================================================== 1592N/A Compresses the source buffer into the destination buffer. The level 1592N/A parameter has the same meaning as in deflateInit. sourceLen is the byte 1592N/A length of the source buffer. Upon entry, destLen is the total size of the 1592N/A destination buffer, which must be at least 0.1% larger than sourceLen plus 1592N/A 12 bytes. Upon exit, destLen is the actual size of the compressed buffer. 1592N/A compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough 1592N/A memory, Z_BUF_ERROR if there was not enough room in the output buffer, 1592N/A Z_STREAM_ERROR if the level parameter is invalid. 1592N/A /* Check for source > 64K on 16-bit machine: */ 1592N/A/* =========================================================================== 1592N/A/* =========================================================================== 1592N/A If the default memLevel or windowBits for deflateInit() is changed, then 1592N/A this function needs to be updated.