code: public static byte[] rawCompress(Object data, int byteSize)
              throws IOException
      {
          byte[] buf = new byte[Snappy.maxCompressedLength(byteSize)];
          int compressedByteSize = impl.rawCompress(data, 0, byteSize, buf, 0);
          byte[] result = new byte[compressedByteSize];
          System.arraycopy(buf, 0, result, 0, compressedByteSize);
          return result;
      }
docs: Compress the input data and produce a byte array of the uncompressed data
  
  @param data input array. The input MUST be an array type
  @param byteSize the input byte size
  @return compressed data