code: public static String decompressGzip(byte[] compressedData, long maxBytes) throws IOException {
          try (final ByteArrayInputStream dataStream = new ByteArrayInputStream(compressedData);
               final GZIPInputStream in = new GZIPInputStream(dataStream);
               final InputStream limited = ByteStreams.limit(in, maxBytes)) {
              return new String(ByteStreams.toByteArray(limited), StandardCharsets.UTF_8);
          }
      }
docs: Decompress GZIP (RFC 1952) compressed data
  
  @param compressedData A byte array containing the GZIP-compressed data.
  @param maxBytes       The maximum number of uncompressed bytes to read.
  @return A string containing the decompressed data