public static byte[] unGzip(byte[] bytes) {
    if (bytes == null) {
      return null;
    }
    ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(bytes);
    ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
    byte[] buffer = new byte[1024];
    int len;
    try (GZIPInputStream gzipInputStream = new GZIPInputStream(byteArrayInputStream)) {
      while ((len = gzipInputStream.read(buffer)) > 0) {
        byteArrayOutputStream.write(buffer, 0, len);
      }
    } catch (IOException e) {
      throw new RuntimeException(e);
    }
    return byteArrayOutputStream.toByteArray();
  }
Decompress the given data using gzip.
amoro-ams/src/main/java/org/apache/amoro/server/utils/CompressUtil.java