public abstract class BytePacker extends Object
packing unpacking treats: - n values at a time (with n % 8 == 0) - bitWidth * (n/8) bytes at a time.
| Modifier and Type | Field and Description |
|---|---|
protected int |
unpackCount
Number of integer values to be unpacked at a time.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getBitWidth() |
int |
getUnpackCount() |
abstract void |
pack32Values(int[] input,
int inPos,
byte[] output,
int outPos)
pack 32 values from input at inPos into bitWidth * 4 bytes in output at outPos.
|
abstract void |
pack8Values(int[] input,
int inPos,
byte[] output,
int outPos)
pack 8 values from input at inPos into bitWidth bytes in output at outPos.
|
void |
unpack32Values(byte[] input,
int inPos,
int[] output,
int outPos)
Deprecated.
|
abstract void |
unpack32Values(ByteBuffer input,
int inPos,
int[] output,
int outPos)
unpack bitWidth * 4 bytes from input at inPos into 32 values in output at outPos.
|
void |
unpack8Values(byte[] input,
int inPos,
int[] output,
int outPos)
Deprecated.
|
abstract void |
unpack8Values(ByteBuffer input,
int inPos,
int[] output,
int outPos)
unpack bitWidth bytes from input at inPos into 8 values in output at outPos.
|
void |
unpackValuesUsingVector(byte[] input,
int inPos,
int[] output,
int outPos)
unpack bitWidth bytes from input at inPos into {unpackCount} values in output at outPos using Java Vector API.
|
void |
unpackValuesUsingVector(ByteBuffer input,
int inPos,
int[] output,
int outPos)
unpack bitWidth bytes from input at inPos into {unpackCount} values in output at outPos using Java Vector API.
|
protected int unpackCount
public final int getBitWidth()
public int getUnpackCount()
public abstract void pack8Values(int[] input,
int inPos,
byte[] output,
int outPos)
input - the input valuesinPos - where to read from in inputoutput - the output bytesoutPos - where to write to in outputpublic abstract void pack32Values(int[] input,
int inPos,
byte[] output,
int outPos)
input - the input valuesinPos - where to read from in inputoutput - the output bytesoutPos - where to write to in outputpublic abstract void unpack8Values(ByteBuffer input, int inPos, int[] output, int outPos)
input - the input bytesinPos - where to read from in inputoutput - the output valuesoutPos - where to write to in output@Deprecated public void unpack8Values(byte[] input, int inPos, int[] output, int outPos)
input - the input bytesinPos - where to read from in inputoutput - the output valuesoutPos - where to write to in outputpublic abstract void unpack32Values(ByteBuffer input, int inPos, int[] output, int outPos)
input - the input bytesinPos - where to read from in inputoutput - the output valuesoutPos - where to write to in output@Deprecated public void unpack32Values(byte[] input, int inPos, int[] output, int outPos)
input - the input bytesinPos - where to read from in inputoutput - the output valuesoutPos - where to write to in outputpublic void unpackValuesUsingVector(byte[] input,
int inPos,
int[] output,
int outPos)
input - the input bytesinPos - where to read from in inputoutput - the output valuesoutPos - where to write to in outputpublic void unpackValuesUsingVector(ByteBuffer input, int inPos, int[] output, int outPos)
input - the input bytesinPos - where to read from in inputoutput - the output valuesoutPos - where to write to in outputCopyright © 2024 The Apache Software Foundation. All rights reserved.