public class BitShuffle
extends java.lang.Object
| Constructor and Description |
|---|
BitShuffle() |
| Modifier and Type | Method and Description |
|---|---|
static int |
shuffle(java.nio.ByteBuffer input,
BitShuffleType type,
java.nio.ByteBuffer shuffled)
Apply a bit-shuffling filter into the content in the given input buffer.
|
static byte[] |
shuffle(double[] input)
Apply a bit-shuffling filter into the input double array.
|
static byte[] |
shuffle(float[] input)
Apply a bit-shuffling filter into the input float array.
|
static byte[] |
shuffle(int[] input)
Apply a bit-shuffling filter into the input int array.
|
static byte[] |
shuffle(long[] input)
Apply a bit-shuffling filter into the input long array.
|
static byte[] |
shuffle(short[] input)
Apply a bit-shuffling filter into the input short array.
|
static int |
unshuffle(java.nio.ByteBuffer shuffled,
BitShuffleType type,
java.nio.ByteBuffer output)
Convert the input bit-shuffled byte array into an original array.
|
static double[] |
unshuffleDoubleArray(byte[] input)
Convert the input bit-shuffled byte array into an original double array.
|
static float[] |
unshuffleFloatArray(byte[] input)
Convert the input bit-shuffled byte array into an original float array.
|
static int[] |
unshuffleIntArray(byte[] input)
Convert the input bit-shuffled byte array into an original int array.
|
static long[] |
unshuffleLongArray(byte[] input)
Convert the input bit-shuffled byte array into an original long array.
|
static short[] |
unshuffleShortArray(byte[] input)
Convert the input bit-shuffled byte array into an original short array.
|
public static int shuffle(java.nio.ByteBuffer input,
BitShuffleType type,
java.nio.ByteBuffer shuffled)
throws java.io.IOException
input - buffer[pos() ... limit()) containing the input datatype - element type of the input datashuffled - output of the shuffled data. Uses range [pos()..].SnappyError - when the input is not a direct bufferjava.lang.IllegalArgumentException - when the input length is not a multiple of the given type sizejava.io.IOExceptionpublic static byte[] shuffle(short[] input)
throws java.io.IOException
input - java.io.IOExceptionpublic static byte[] shuffle(int[] input)
throws java.io.IOException
input - java.io.IOExceptionpublic static byte[] shuffle(long[] input)
throws java.io.IOException
input - java.io.IOExceptionpublic static byte[] shuffle(float[] input)
throws java.io.IOException
input - java.io.IOExceptionpublic static byte[] shuffle(double[] input)
throws java.io.IOException
input - java.io.IOExceptionpublic static int unshuffle(java.nio.ByteBuffer shuffled,
BitShuffleType type,
java.nio.ByteBuffer output)
throws java.io.IOException
shuffled - buffer[pos() ... limit()) containing the input shuffled datatype - element type of the input dataoutput - output of the the original data. It uses buffer[pos()..]java.io.IOException - when failed to unshuffle the given inputSnappyError - when the input is not a direct bufferjava.lang.IllegalArgumentException - when the length of input shuffled data is not a multiple of the given type sizepublic static short[] unshuffleShortArray(byte[] input)
throws java.io.IOException
input - java.io.IOExceptionpublic static int[] unshuffleIntArray(byte[] input)
throws java.io.IOException
input - java.io.IOExceptionpublic static long[] unshuffleLongArray(byte[] input)
throws java.io.IOException
input - java.io.IOExceptionpublic static float[] unshuffleFloatArray(byte[] input)
throws java.io.IOException
input - java.io.IOExceptionpublic static double[] unshuffleDoubleArray(byte[] input)
throws java.io.IOException
input - java.io.IOException