/** * Apply a bit-shuffling filter into the input float array. * * @param input * @return bit-shuffled byte array * @throws IOException */ public static byte[] shuffle(float[] input) throws IOException { byte[] output = new byte[input.length * 4]; int numProcessed = impl.shuffle(input, 0, 4, input.length * 4, output, 0); assert(numProcessed == input.length * 4); return output; }
/** * Apply a bit-shuffling filter into the input int array. * * @param input * @return bit-shuffled byte array * @throws IOException */ public static byte[] shuffle(int[] input) throws IOException { byte[] output = new byte[input.length * 4]; int numProcessed = impl.shuffle(input, 0, 4, input.length * 4, output, 0); assert(numProcessed == input.length * 4); return output; }
/** * Apply a bit-shuffling filter into the input short array. * * @param input * @return bit-shuffled byte array * @throws IOException */ public static byte[] shuffle(short[] input) throws IOException { byte[] output = new byte[input.length * 2]; int numProcessed = impl.shuffle(input, 0, 2, input.length * 2, output, 0); assert(numProcessed == input.length * 2); return output; }
/** * Apply a bit-shuffling filter into the input long array. * * @param input * @return bit-shuffled byte array * @throws IOException */ public static byte[] shuffle(long[] input) throws IOException { byte[] output = new byte[input.length * 8]; int numProcessed = impl.shuffle(input, 0, 8, input.length * 8, output, 0); assert(numProcessed == input.length * 8); return output; }
/** * Apply a bit-shuffling filter into the input double array. * * @param input * @return bit-shuffled byte array * @throws IOException */ public static byte[] shuffle(double[] input) throws IOException { byte[] output = new byte[input.length * 8]; int numProcessed = impl.shuffle(input, 0, 8, input.length * 8, output, 0); assert(numProcessed == input.length * 8); return output; }