{
byte[] input = new byte[frame.body.readableBytes()];
frame.body.readBytes(input);
if (!Snappy.isValidCompressedBuffer(input, 0, input.length))
throw new ProtocolException("Provided frame does not appear to be Snappy compressed");
byte[] output = new byte[Snappy.uncompressedLength(input)];
int size = Snappy.uncompress(input, 0, input.length, output, 0);
return frame.with(ChannelBuffers.wrappedBuffer(output, 0, size));
}