packagecom.owlmaddie.utils;importjava.io.ByteArrayOutputStream;importjava.util.zip.Inflater;/** * The {@code Decompression} class is used to decompress a JSON byte array and return a string. */publicclassDecompression{publicstaticStringdecompressString(byte[]data){try(ByteArrayOutputStreamoutputStream=newByteArrayOutputStream(data.length)){Inflaterinflater=newInflater();inflater.setInput(data);byte[]buffer=newbyte[1024];while(!inflater.finished()){intcount=inflater.inflate(buffer);outputStream.write(buffer,0,count);}inflater.end();returnoutputStream.toString();}catch(Exceptione){e.printStackTrace();returnnull;}}}