@Override public double[] unCompressDouble(byte[] compInput, int offset, int length) { byte[] unCompArray = unCompressByte(compInput, offset, length); DoubleBuffer unCompBuffer = ByteBuffer.wrap(unCompArray).order(ByteOrder.LITTLE_ENDIAN).asDoubleBuffer(); double[] doubles = new double[unCompArray.length / ByteUtil.SIZEOF_DOUBLE]; unCompBuffer.get(doubles); return doubles; }
@Override public float[] unCompressFloat(byte[] compInput, int offset, int length) { byte[] unCompArray = unCompressByte(compInput, offset, length); FloatBuffer unCompBuffer = ByteBuffer.wrap(unCompArray).order(ByteOrder.LITTLE_ENDIAN).asFloatBuffer(); float[] floats = new float[unCompArray.length / ByteUtil.SIZEOF_FLOAT]; unCompBuffer.get(floats); return floats; }
@Override public int[] unCompressInt(byte[] compInput, int offset, int length) { byte[] unCompArray = unCompressByte(compInput, offset, length); IntBuffer unCompBuffer = ByteBuffer.wrap(unCompArray).order(ByteOrder.LITTLE_ENDIAN).asIntBuffer(); int[] ints = new int[unCompArray.length / ByteUtil.SIZEOF_INT]; unCompBuffer.get(ints); return ints; }
@Override public short[] unCompressShort(byte[] compInput, int offset, int length) { byte[] unCompArray = unCompressByte(compInput, offset, length); ShortBuffer unCompBuffer = ByteBuffer.wrap(unCompArray).order(ByteOrder.LITTLE_ENDIAN).asShortBuffer(); short[] shorts = new short[unCompArray.length / ByteUtil.SIZEOF_SHORT]; unCompBuffer.get(shorts); return shorts; }
@Override public long[] unCompressLong(byte[] compInput, int offset, int length) { byte[] unCompArray = unCompressByte(compInput, offset, length); LongBuffer unCompBuffer = ByteBuffer.wrap(unCompArray).order(ByteOrder.LITTLE_ENDIAN).asLongBuffer(); long[] longs = new long[unCompArray.length / ByteUtil.SIZEOF_LONG]; unCompBuffer.get(longs); return longs; }