* @return
*/
@Override
public BSPMessageBundle<M> decompressBundle(BSPCompressedBundle compMsgBundle) {
ByteArrayInputStream bis = null;
SnappyInputStream sis = null;
DataInputStream dis = null;
BSPMessageBundle<M> bundle = new BSPMessageBundle<M>();
try {
byte[] data = compMsgBundle.getData();
bis = new ByteArrayInputStream(data);
sis = new SnappyInputStream(bis);
dis = new DataInputStream(sis);
bundle.readFields(dis);
} catch (IOException ioe) {
LOG.error("Unable to decompress.", ioe);
} finally {
try {
dis.close();
sis.close();
bis.close();
} catch (IOException e) {
LOG.warn("Failed to close decompression streams.", e);
}
}