def compress()

in src/main/scala/com/gu/thrift/serializer/Compression.scala [42:51]


  def compress(data: Array[Byte]): Array[Byte] = 
    try {
      val bos = new ByteArrayOutputStream()
      val out = new ZstdOutputStream(bos)
      out.write(data)
      out.close()
      bos.toByteArray
    } catch {
      case e: IOException => throw new RuntimeException(e)
    }