byte[] result;
for (int i = 0; i < comps.length; i++) {
ByteArrayInputStream input = new ByteArrayInputStream(data);
Compressor comp = comps[i];
// 基于流的处理
InputStream encrypt = comp.compress(input);
InputStream decrypt = comp.decompress(encrypt);
result = NioUtils.read(decrypt);
check(data, result);
encrypt.close();
decrypt.close();