code: public void uncompress() {
          data.position(0);
          byte[] buffer = new byte[8192];
          IoBuffer tmp = IoBuffer.allocate(0);
          tmp.setAutoExpand(true);
          try (InflaterInputStream inflater = new InflaterInputStream(data.asInputStream())) {
              while (inflater.available() > 0) {
                  int decompressed = inflater.read(buffer);
                  if (decompressed <= 0) {
                      // Finished decompression
                      break;
                  }
                  tmp.put(buffer, 0, decompressed);
              }
          } catch (IOException e) {
              tmp.free();
              throw new RuntimeException("could not uncompress data", e);
          }
          data.free();
          data = tmp;
          data.flip();
          prepareIO();
      }
docs: Decompress contents using zlib.