code: public static boolean isValidCompressedBuffer(byte[] input, int offset, int length)
              throws IOException
      {
          if (input == null) {
              throw new NullPointerException("input is null");
          }
          return impl.isValidCompressedBuffer(input, offset, length);
      }
docs: Returns true iff the contents of compressed buffer [offset,
  offset+length) can be uncompressed successfully. Does not return the
  uncompressed data. Takes time proportional to the input length, but is
  usually at least a factor of four faster than actual decompression.