/** * Convert the input bit-shuffled byte array into an original long array. * * @param input * @return a long array * @throws IOException */ public static long[] unshuffleLongArray(byte[] input) throws IOException { long[] output = new long[input.length / 8]; int numProcessed = impl.unshuffle(input, 0, 8, input.length, output, 0); assert(numProcessed == input.length); return output; }
/** * Convert the input bit-shuffled byte array into an original int array. * * @param input * @return an int array * @throws IOException */ public static int[] unshuffleIntArray(byte[] input) throws IOException { int[] output = new int[input.length / 4]; int numProcessed = impl.unshuffle(input, 0, 4, input.length, output, 0); assert(numProcessed == input.length); return output; }
/** * Convert the input bit-shuffled byte array into an original float array. * * @param input * @return an float array * @throws IOException */ public static float[] unshuffleFloatArray(byte[] input) throws IOException { float[] output = new float[input.length / 4]; int numProcessed = impl.unshuffle(input, 0, 4, input.length, output, 0); assert(numProcessed == input.length); return output; }
/** * Convert the input bit-shuffled byte array into an original short array. * * @param input * @return a short array * @throws IOException */ public static short[] unshuffleShortArray(byte[] input) throws IOException { short[] output = new short[input.length / 2]; int numProcessed = impl.unshuffle(input, 0, 2, input.length, output, 0); assert(numProcessed == input.length); return output; }
/** * Convert the input bit-shuffled byte array into an original double array. * * @param input * @return a double array * @throws IOException */ public static double[] unshuffleDoubleArray(byte[] input) throws IOException { double[] output = new double[input.length / 8]; int numProcessed = impl.unshuffle(input, 0, 8, input.length, output, 0); assert(numProcessed == input.length); return output; } }