in src/main/scala/com/gu/thrift/serializer/Compression.scala [27:38]
def uncompress(data: ByteBuffer): ByteBuffer =
try {
val bos = new ByteArrayOutputStream()
val bis = new ByteBufferBackedInputStream(data)
val in = new GZIPInputStream(bis)
IOUtils.copy(in, bos)
in.close()
bos.close()
ByteBuffer.wrap(bos.toByteArray)
} catch {
case e: IOException => throw new RuntimeException(e)
}