code: public static boolean isValidCompressedBuffer(ByteBuffer compressed)
              throws IOException
      {
          return impl.isValidCompressedBuffer(compressed, compressed.position(),
                  compressed.remaining());
      }
docs: Returns true iff the contents of compressed buffer [pos() ... limit())
  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.