code: public static int rawCompress(Object input, int inputOffset, int inputLength, byte[] output, int outputOffset)
              throws IOException
      {
          if (input == null || output == null) {
              throw new NullPointerException("input or output is null");
          }
  
          int compressedSize = impl
                  .rawCompress(input, inputOffset, inputLength, output, outputOffset);
          return compressedSize;
      }
docs: Compress the input buffer [offset,... ,offset+length) contents, then
  write the compressed data to the output buffer[offset, ...)
  
  @param input input array. This MUST be a primitive array type
  @param inputOffset byte offset at the output array
  @param inputLength byte length of the input data
  @param output output array. This MUST be a primitive array type
  @param outputOffset byte offset at the output array
  @return byte size of the compressed data
  @throws IOException