}
byte[] compressedData = doCompress(uncompressedData);
Bucket inBucket = new ArrayBucket(compressedData);
NullBucket outBucket = new NullBucket();
InputStream decompressorInput = null;
OutputStream decompressorOutput = null;
try {
decompressorInput = inBucket.getInputStream();
decompressorOutput = outBucket.getOutputStream();
Compressor.COMPRESSOR_TYPE.LZMA_NEW.decompress(decompressorInput, decompressorOutput, 4096 + 10, 4096 + 20);
decompressorInput.close();
decompressorOutput.close();
} catch (CompressionOutputSizeException e) {
// expect this
return;
} finally {
Closer.close(decompressorInput);
Closer.close(decompressorOutput);
inBucket.free();
outBucket.free();
}
// TODO LOW codec doesn't actually enforce size limit
//fail("did not throw expected CompressionOutputSizeException");
}