code: public  int[] compress(int[] input) {
          int [] compressed = new int[input.length + input.length / 100 + 1024];
          compressed[0] = input.length;
          IntWrapper outpos = new IntWrapper(1);
          IntWrapper initvalue = new IntWrapper(0);
  		try {
  			codec.headlessCompress(input, new IntWrapper(0), input.length, compressed, outpos, initvalue);
  		} catch (IndexOutOfBoundsException ioebe) {
  			throw new UncompressibleInputException(
  					"Your input is too poorly compressible with the current codec : " + codec);
  		}
          compressed = Arrays.copyOf(compressed,outpos.intValue());
          return compressed;
      }
docs: Compress an array and returns the compressed result as a new array.
  
  @param input array to be compressed
  @return compressed array
  @throws UncompressibleInputException if the data is too poorly compressible