We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The IntelInflater API needs some changes to match the Inflater API.
IntelInflater
Inflater
reset()
inflate(result)
result.length
The following code will test these changes.
final IntelInflaterFactory intelInflaterFactory = new IntelInflaterFactory(); for (int i = 0; i < 10; i++) { // create deflater with compression level i final Deflater deflater = new Deflater(i, true); // setup deflater deflater.reset(); deflater.setInput(input); deflater.finish(); // compress data int compressedBytes = 0; while (!deflater.finished()) { compressedBytes = deflater.deflate(compressed, 0, compressed.length); } deflater.end(); // log results log.info("%d bytes compressed to %d bytes : %2.2f%% compression\n", LEN, compressedBytes, 100.0 - 100.0 * compressedBytes / LEN); // decompress and check output == input Inflater inflater = intelInflaterFactory.makeInflater(true); try { inflater.setInput(compressed, 0, compressedBytes); inflater.inflate(result); inflater.end(); } catch (java.util.zip.DataFormatException e) { e.printStackTrace(); } Assert.assertEquals(input, result); }
The text was updated successfully, but these errors were encountered:
Closed with #48
Sorry, something went wrong.
pnvaidya
No branches or pull requests
The
IntelInflater
API needs some changes to match theInflater
API.IntelInflater
should not require callingreset()
before use.inflate(result)
is called without specifying the length argument, length should default toresult.length
.The following code will test these changes.
The text was updated successfully, but these errors were encountered: