/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
*/
/*
* Run this test on JDK 6 and on later
* JDKs to compare results:
* java -server -Xms1024M -Xmx1024M -Ddebug=true FlaterCriticalArray
*
* The performance issues can be readily seen on JDK 6, and so this code is
* written to compile on that platform: it does *not* use any JDK 7 - specific
* features.
*/
public class FlaterCriticalArray {
// If true, print information about performance
}
}
a = a2;
}
return a;
}
return res;
}
/*
* Base class for individual test cases
*/
abstract static private class TestCase {
}
}
debug("");
name + ": Inflated and deflated arrays do not match");
}
}
}
/*
* Following are the individual test cases
*/
}
final byte[] smallBuffer = new byte[32];
byte[] flated = new byte[32];
int count = 0;
while (!deflater.needsInput()) {
count += n;
}
}
int n;
do {
count += n;
} while (n > 0);
}
final byte[] smallBuffer = new byte[3200];
byte[] flated = new byte[32];
int count = 0;
while (!inflater.needsInput()) {
int n;
count += n;
}
}
}
}
}
}
final byte[] smallBuffer = new byte[32];
byte[] flated = new byte[32];
int count = 0;
int n;
count += n;
}
}
final byte[] smallBuffer = new byte[32];
byte[] flated = new byte[32];
int count = 0;
int n;
count += n;
}
}
}
/**
* Check Deflater{In,Out}putStream by way of GZIP{In,Out}putStream
*/
super("GZIP", data);
}
return baos.toByteArray();
}
int numRead = 0;
int count = 0;
}
return inflated;
}
}
byte data[];
int level = -1;
}
} else {
for (int i = 0; i < 1024 * 64; i++) { // data length
}
debug("Original data from random byte array");
}
}
//--------------------- Infrastructure ---------------------------
else fail(x + " not equal to " + y);}
}