fm.liveswitch.Binary Class Reference

Common binary methods. More...

Public Member Functions

 Binary ()
 

Static Public Member Functions

static byte[] bitStringToBytes (String bitString)
 Converts a bit-string to bytes. More...
 
static byte[] bitStringToBytes (String bitString, fm.liveswitch.IntegerHolder numberOfUnusedBits)
 Converts a bit-string to bytes. More...
 
static byte[] bitStringToBytes (String bitString, boolean padLeft)
 Converts a bit-string to bytes. More...
 
static byte[] bitStringToBytes (String bitString, boolean padLeft, fm.liveswitch.IntegerHolder numberOfUnusedBits)
 Converts a bit-string to bytes. More...
 
static String bytesToBitString (byte[] bytes)
 Converts bytes to a bit-string. More...
 
static String bytesToBitString (byte[] bytes, int offset, int length)
 Converts bytes to a bit-string. More...
 
static String bytesToBitString (byte[] bytes, int offset, int length, int numberOfUnusedBits)
 Converts bytes to a bit-string. More...
 
static String bytesToBitString (byte[] bytes, int offset, int length, int numberOfUnusedBits, boolean trimLeft)
 Converts bytes to a bit-string. More...
 
static void deinterleave (byte[] inputFrame, byte[] outputFrame)
 Deinterleaves a byte array i.e. More...
 
static void deinterleave (byte[] inputFrame, byte[] outputFrame, int start, int length)
 Deinterleaves a byte array i.e. More...
 
static void deinterleave (byte[] inputFrame, byte[] outputFrame, int start, int length, boolean reversePlanes)
 Deinterleaves a byte array. More...
 
static void deinterleaveTransform (byte[] inputFrame, byte[] outputFrame, int width, int height, int stride, int rotation)
 Deinterleave and transform (rotate) a byte array containing two planes. More...
 
static void deinterleaveTransform (byte[] inputFrame, byte[] outputFrame, int width, int height, int stride, int rotation, int start)
 Deinterleave and transform (rotate) a byte array containing two planes. More...
 
static void deinterleaveTransform (byte[] inputFrame, byte[] outputFrame, int width, int height, int stride, int rotation, int start, boolean reversePlanes)
 Deinterleave and transform (rotate) a byte array containing two planes. More...
 
static boolean fromBytes1 (byte[] input, int inputIndex, int bitOffset)
 Reads a 1-bit value from a byte array. More...
 
static int fromBytes10 (byte[] input, int inputIndex, int bitOffset)
 Reads a 10-bit value from a byte array. More...
 
static int fromBytes11 (byte[] input, int inputIndex, int bitOffset)
 Reads a 11-bit value from a byte array. More...
 
static int fromBytes12 (byte[] input, int inputIndex, int bitOffset)
 Reads a 12-bit value from a byte array. More...
 
static int fromBytes13 (byte[] input, int inputIndex, int bitOffset)
 Reads a 13-bit value from a byte array. More...
 
static int fromBytes14 (byte[] input, int inputIndex, int bitOffset)
 Reads a 14-bit value from a byte array. More...
 
static int fromBytes15 (byte[] input, int inputIndex, int bitOffset)
 Reads a 15-bit value from a byte array. More...
 
static int fromBytes16 (byte[] input, int inputIndex, boolean littleEndian)
 Reads a 16-bit value from a byte array. More...
 
static int fromBytes17 (byte[] input, int inputIndex, int bitOffset)
 Reads an 17-bit value from a byte array. More...
 
static int fromBytes18 (byte[] input, int inputIndex, int bitOffset)
 Reads an 18-bit value from a byte array. More...
 
static int fromBytes19 (byte[] input, int inputIndex, int bitOffset)
 Reads an 19-bit value from a byte array. More...
 
static int fromBytes2 (byte[] input, int inputIndex, int bitOffset)
 Reads a 2-bit value from a byte array. More...
 
static int fromBytes20 (byte[] input, int inputIndex, int bitOffset)
 Reads an 20-bit value from a byte array. More...
 
static int fromBytes21 (byte[] input, int inputIndex, int bitOffset)
 Reads an 21-bit value from a byte array. More...
 
static int fromBytes22 (byte[] input, int inputIndex, int bitOffset)
 Reads an 22-bit value from a byte array. More...
 
static int fromBytes23 (byte[] input, int inputIndex, int bitOffset)
 Reads an 23-bit value from a byte array. More...
 
static int fromBytes24 (byte[] input, int inputIndex, boolean littleEndian)
 Reads a 24-bit value from a byte array. More...
 
static int fromBytes3 (byte[] input, int inputIndex, int bitOffset)
 Reads a 3-bit value from a byte array. More...
 
static long fromBytes32 (byte[] input, int inputIndex, boolean littleEndian)
 Reads a 32-bit value from a byte array. More...
 
static int fromBytes4 (byte[] input, int inputIndex, int bitOffset)
 Reads a 4-bit value from a byte array. More...
 
static long fromBytes40 (byte[] input, int inputIndex, boolean littleEndian)
 Reads a 40-bit value from a byte array. More...
 
static long fromBytes48 (byte[] input, int inputIndex, boolean littleEndian)
 Reads a 48-bit value from a byte array. More...
 
static int fromBytes5 (byte[] input, int inputIndex, int bitOffset)
 Reads a 5-bit value from a byte array. More...
 
static long fromBytes56 (byte[] input, int inputIndex, boolean littleEndian)
 Reads a 56-bit value from a byte array. More...
 
static int fromBytes6 (byte[] input, int inputIndex, int bitOffset)
 Reads a 6-bit value from a byte array. More...
 
static long fromBytes64 (byte[] input, int inputIndex, boolean littleEndian)
 Reads a 64-bit value from a byte array. More...
 
static int fromBytes7 (byte[] input, int inputIndex, int bitOffset)
 Reads a 7-bit value from a byte array. More...
 
static int fromBytes8 (byte[] input, int inputIndex)
 Reads an 8-bit value from a byte array. More...
 
static int fromBytes9 (byte[] input, int inputIndex, int bitOffset)
 Reads a 9-bit value from a byte array. More...
 
static void interleave (byte[] inputFrame, byte[] outputFrame)
 Interleaves a byte array i.e. More...
 
static void interleave (byte[] inputFrame, byte[] outputFrame, int start, int length)
 Interleaves a byte array i.e. More...
 
static void interleave (byte[] inputFrame, byte[] outputFrame, int start, int length, boolean reversePlanes)
 Interleaves a byte array i.e. More...
 
static void interleaveTransform (byte[] inputFrame, byte[] outputFrame, int width, int height, int stride, int rotation)
 Interleave and transform (rotate) a byte array containing two planes. More...
 
static void interleaveTransform (byte[] inputFrame, byte[] outputFrame, int width, int height, int stride, int rotation, int start)
 Interleave and transform (rotate) a byte array containing two planes. More...
 
static void interleaveTransform (byte[] inputFrame, byte[] outputFrame, int width, int height, int stride, int rotation, int start, boolean reversePlanes)
 Interleave and transform (rotate) a byte array containing two planes. More...
 
static byte[] toBytes1 (boolean value, int bitOffset)
 Converts a 1-bit value to a byte array. More...
 
static byte[] toBytes1 (boolean value, int bitOffset, byte[] output, int outputIndex)
 Writes a 1-bit value to a byte array. More...
 
static byte[] toBytes10 (int value, int bitOffset, boolean littleEndian)
 Converts a 10-bit value to a byte array. More...
 
static byte[] toBytes10 (int value, int bitOffset, boolean littleEndian, byte[] output, int outputIndex)
 Writes a 10-bit value to a byte array. More...
 
static byte[] toBytes11 (int value, int bitOffset, boolean littleEndian)
 Converts a 11-bit value to a byte array. More...
 
static byte[] toBytes11 (int value, int bitOffset, boolean littleEndian, byte[] output, int outputIndex)
 Writes a 11-bit value to a byte array. More...
 
static byte[] toBytes12 (int value, int bitOffset, boolean littleEndian)
 Converts a 12-bit value to a byte array. More...
 
static byte[] toBytes12 (int value, int bitOffset, boolean littleEndian, byte[] output, int outputIndex)
 Writes a 12-bit value to a byte array. More...
 
static byte[] toBytes13 (int value, int bitOffset, boolean littleEndian)
 Converts a 13-bit value to a byte array. More...
 
static byte[] toBytes13 (int value, int bitOffset, boolean littleEndian, byte[] output, int outputIndex)
 Writes a 13-bit value to a byte array. More...
 
static byte[] toBytes14 (int value, int bitOffset, boolean littleEndian)
 Converts a 14-bit value to a byte array. More...
 
static byte[] toBytes14 (int value, int bitOffset, boolean littleEndian, byte[] output, int outputIndex)
 Writes a 14-bit value to a byte array. More...
 
static byte[] toBytes15 (int value, int bitOffset, boolean littleEndian)
 Converts a 15-bit value to a byte array. More...
 
static byte[] toBytes15 (int value, int bitOffset, boolean littleEndian, byte[] output, int outputIndex)
 Writes a 15-bit value to a byte array. More...
 
static byte[] toBytes16 (int value, boolean littleEndian)
 Converts a 16-bit value to a byte array. More...
 
static byte[] toBytes16 (int value, boolean littleEndian, byte[] output, int outputIndex)
 Writes a 16-bit value to a byte array. More...
 
static byte[] toBytes17 (int value, int bitOffset, boolean littleEndian)
 Converts a 17-bit value to a byte array. More...
 
static byte[] toBytes17 (int value, int bitOffset, boolean littleEndian, byte[] output, int outputIndex)
 Writes a 17-bit value to a byte array. More...
 
static byte[] toBytes18 (int value, int bitOffset, boolean littleEndian)
 Converts an 18-bit value to a byte array. More...
 
static byte[] toBytes18 (int value, int bitOffset, boolean littleEndian, byte[] output, int outputIndex)
 Writes an 18-bit value to a byte array. More...
 
static byte[] toBytes19 (int value, int bitOffset, boolean littleEndian)
 Converts a 19-bit value to a byte array. More...
 
static byte[] toBytes19 (int value, int bitOffset, boolean littleEndian, byte[] output, int outputIndex)
 Writes a 19-bit value to a byte array. More...
 
static byte[] toBytes2 (int value, int bitOffset)
 Converts a 2-bit value to a byte array. More...
 
static byte[] toBytes2 (int value, int bitOffset, byte[] output, int outputIndex)
 Writes a 2-bit value to a byte array. More...
 
static byte[] toBytes20 (int value, int bitOffset, boolean littleEndian)
 Converts a 20-bit value to a byte array. More...
 
static byte[] toBytes20 (int value, int bitOffset, boolean littleEndian, byte[] output, int outputIndex)
 Writes a 20-bit value to a byte array. More...
 
static byte[] toBytes21 (int value, int bitOffset, boolean littleEndian)
 Converts a 21-bit value to a byte array. More...
 
static byte[] toBytes21 (int value, int bitOffset, boolean littleEndian, byte[] output, int outputIndex)
 Writes a 21-bit value to a byte array. More...
 
static byte[] toBytes22 (int value, int bitOffset, boolean littleEndian)
 Converts a 22-bit value to a byte array. More...
 
static byte[] toBytes22 (int value, int bitOffset, boolean littleEndian, byte[] output, int outputIndex)
 Writes a 22-bit value to a byte array. More...
 
static byte[] toBytes23 (int value, int bitOffset, boolean littleEndian)
 Converts a 23-bit value to a byte array. More...
 
static byte[] toBytes23 (int value, int bitOffset, boolean littleEndian, byte[] output, int outputIndex)
 Writes a 23-bit value to a byte array. More...
 
static byte[] toBytes24 (int value, boolean littleEndian)
 Converts a 24-bit value to a byte array. More...
 
static byte[] toBytes24 (int value, boolean littleEndian, byte[] output, int outputIndex)
 Writes a 24-bit value to a byte array. More...
 
static byte[] toBytes3 (int value, int bitOffset)
 Converts a 3-bit value to a byte array. More...
 
static byte[] toBytes3 (int value, int bitOffset, byte[] output, int outputIndex)
 Writes a 3-bit value to a byte array. More...
 
static byte[] toBytes32 (long value, boolean littleEndian)
 Converts a 32-bit value to a byte array. More...
 
static byte[] toBytes32 (long value, boolean littleEndian, byte[] output, int outputIndex)
 Writes a 32-bit value to a byte array. More...
 
static byte[] toBytes4 (int value, int bitOffset)
 Converts a 4-bit value to a byte array. More...
 
static byte[] toBytes4 (int value, int bitOffset, byte[] output, int outputIndex)
 Writes a 4-bit value to a byte array. More...
 
static byte[] toBytes40 (long value, boolean littleEndian)
 Converts a 40-bit value to a byte array. More...
 
static byte[] toBytes40 (long value, boolean littleEndian, byte[] output, int outputIndex)
 Writes a 40-bit value to a byte array. More...
 
static byte[] toBytes48 (long value, boolean littleEndian)
 Converts a 48-bit value to a byte array. More...
 
static byte[] toBytes48 (long value, boolean littleEndian, byte[] output, int outputIndex)
 Writes a 48-bit value to a byte array. More...
 
static byte[] toBytes5 (int value, int bitOffset)
 Converts a 5-bit value to a byte array. More...
 
static byte[] toBytes5 (int value, int bitOffset, byte[] output, int outputIndex)
 Writes a 5-bit value to a byte array. More...
 
static byte[] toBytes56 (long value, boolean littleEndian)
 Converts a 56-bit value to a byte array. More...
 
static byte[] toBytes56 (long value, boolean littleEndian, byte[] output, int outputIndex)
 Writes a 56-bit value to a byte array. More...
 
static byte[] toBytes6 (int value, int bitOffset)
 Converts a 6-bit value to a byte array. More...
 
static byte[] toBytes6 (int value, int bitOffset, byte[] output, int outputIndex)
 Writes a 6-bit value to a byte array. More...
 
static byte[] toBytes64 (long value, boolean littleEndian)
 Converts a 64-bit value to a byte array. More...
 
static byte[] toBytes64 (long value, boolean littleEndian, byte[] output, int outputIndex)
 Writes a 64-bit value to a byte array. More...
 
static byte[] toBytes7 (int value, int bitOffset)
 Converts a 7-bit value to a byte array. More...
 
static byte[] toBytes7 (int value, int bitOffset, byte[] output, int outputIndex)
 Writes a 7-bit value to a byte array. More...
 
static byte[] toBytes8 (int value)
 Converts an 8-bit value to a byte array. More...
 
static byte[] toBytes8 (int value, byte[] output, int outputIndex)
 Writes an 8-bit value to a byte array. More...
 
static byte[] toBytes9 (int value, int bitOffset, boolean littleEndian)
 Converts a 9-bit value to a byte array. More...
 
static byte[] toBytes9 (int value, int bitOffset, boolean littleEndian, byte[] output, int outputIndex)
 Writes a 9-bit value to a byte array. More...
 
static void transform (byte[] inputFrame, byte[] outputFrame, int width, int height, int stride, int rotation)
 Transforms a byte containing a 2D plane (rotates 90, 180, 270) More...
 
static void transform (byte[] inputFrame, byte[] outputFrame, int width, int height, int stride, int rotation, int inputStart, int outputStart)
 Transforms a byte containing a 2D plane (rotates 90, 180, 270) More...
 
static void transform (byte[] inputFrame, byte[] outputFrame, int width, int height, int stride, int rotation, int inputStart, int outputStart, int chunkLength)
 Transforms a byte containing a 2D plane (rotates 90, 180, 270). More...
 
static void transform (byte[] inputFrame, byte[] outputFrame, int width, int height, int stride, int rotation, int start)
 Transforms a byte containing a 2D plane (rotates 90, 180, 270) More...
 
static boolean tryFromBytes1 (byte[] input, int inputIndex, int bitOffset, fm.liveswitch.BooleanHolder value)
 Tries to read a 1-bit value from a byte array. More...
 
static boolean tryFromBytes10 (byte[] input, int inputIndex, int bitOffset, fm.liveswitch.IntegerHolder value)
 Tries to read a 10-bit value from a byte array. More...
 
static boolean tryFromBytes11 (byte[] input, int inputIndex, int bitOffset, fm.liveswitch.IntegerHolder value)
 Tries to read a 11-bit value from a byte array. More...
 
static boolean tryFromBytes12 (byte[] input, int inputIndex, int bitOffset, fm.liveswitch.IntegerHolder value)
 Tries to read a 12-bit value from a byte array. More...
 
static boolean tryFromBytes13 (byte[] input, int inputIndex, int bitOffset, fm.liveswitch.IntegerHolder value)
 Tries to read a 13-bit value from a byte array. More...
 
static boolean tryFromBytes14 (byte[] input, int inputIndex, int bitOffset, fm.liveswitch.IntegerHolder value)
 Tries to read a 14-bit value from a byte array. More...
 
static boolean tryFromBytes15 (byte[] input, int inputIndex, int bitOffset, fm.liveswitch.IntegerHolder value)
 Tries to read a 15-bit value from a byte array. More...
 
static boolean tryFromBytes16 (byte[] input, int inputIndex, boolean littleEndian, fm.liveswitch.IntegerHolder value)
 Tries to read a 16-bit value from a byte array. More...
 
static boolean tryFromBytes17 (byte[] input, int inputIndex, int bitOffset, fm.liveswitch.IntegerHolder value)
 Tries to read a 17-bit value from a byte array. More...
 
static boolean tryFromBytes18 (byte[] input, int inputIndex, int bitOffset, fm.liveswitch.IntegerHolder value)
 Tries to read a 18-bit value from a byte array. More...
 
static boolean tryFromBytes19 (byte[] input, int inputIndex, int bitOffset, fm.liveswitch.IntegerHolder value)
 Tries to read a 19-bit value from a byte array. More...
 
static boolean tryFromBytes2 (byte[] input, int inputIndex, int bitOffset, fm.liveswitch.IntegerHolder value)
 Tries to read a 2-bit value from a byte array. More...
 
static boolean tryFromBytes20 (byte[] input, int inputIndex, int bitOffset, fm.liveswitch.IntegerHolder value)
 Tries to read a 20-bit value from a byte array. More...
 
static boolean tryFromBytes21 (byte[] input, int inputIndex, int bitOffset, fm.liveswitch.IntegerHolder value)
 Tries to read a 21-bit value from a byte array. More...
 
static boolean tryFromBytes22 (byte[] input, int inputIndex, int bitOffset, fm.liveswitch.IntegerHolder value)
 Tries to read a 22-bit value from a byte array. More...
 
static boolean tryFromBytes23 (byte[] input, int inputIndex, int bitOffset, fm.liveswitch.IntegerHolder value)
 Tries to read a 23-bit value from a byte array. More...
 
static boolean tryFromBytes24 (byte[] input, int inputIndex, boolean littleEndian, fm.liveswitch.IntegerHolder value)
 Tries to read a 24-bit value from a byte array. More...
 
static boolean tryFromBytes3 (byte[] input, int inputIndex, int bitOffset, fm.liveswitch.IntegerHolder value)
 Tries to read a 3-bit value from a byte array. More...
 
static boolean tryFromBytes32 (byte[] input, int inputIndex, boolean littleEndian, fm.liveswitch.LongHolder value)
 Tries to read a 32-bit value from a byte array. More...
 
static boolean tryFromBytes4 (byte[] input, int inputIndex, int bitOffset, fm.liveswitch.IntegerHolder value)
 Tries to read a 4-bit value from a byte array. More...
 
static boolean tryFromBytes40 (byte[] input, int inputIndex, boolean littleEndian, fm.liveswitch.LongHolder value)
 Tries to read a 40-bit value from a byte array. More...
 
static boolean tryFromBytes48 (byte[] input, int inputIndex, boolean littleEndian, fm.liveswitch.LongHolder value)
 Tries to read a 48-bit value from a byte array. More...
 
static boolean tryFromBytes5 (byte[] input, int inputIndex, int bitOffset, fm.liveswitch.IntegerHolder value)
 Tries to read a 5-bit value from a byte array. More...
 
static boolean tryFromBytes56 (byte[] input, int inputIndex, boolean littleEndian, fm.liveswitch.LongHolder value)
 Tries to read a 56-bit value from a byte array. More...
 
static boolean tryFromBytes6 (byte[] input, int inputIndex, int bitOffset, fm.liveswitch.IntegerHolder value)
 Tries to read a 6-bit value from a byte array. More...
 
static boolean tryFromBytes64 (byte[] input, int inputIndex, boolean littleEndian, fm.liveswitch.LongHolder value)
 Tries to read a 64-bit value from a byte array. More...
 
static boolean tryFromBytes7 (byte[] input, int inputIndex, int bitOffset, fm.liveswitch.IntegerHolder value)
 Tries to read a 7-bit value from a byte array. More...
 
static boolean tryFromBytes8 (byte[] input, int inputIndex, fm.liveswitch.IntegerHolder value)
 Tries to read an 8-bit value from a byte array. More...
 
static boolean tryFromBytes9 (byte[] input, int inputIndex, int bitOffset, fm.liveswitch.IntegerHolder value)
 Tries to read a 9-bit value from a byte array. More...
 

Detailed Description

Common binary methods.

Constructor & Destructor Documentation

◆ Binary()

fm.liveswitch.Binary.Binary ( )

Member Function Documentation

◆ bitStringToBytes() [1/4]

static byte [] fm.liveswitch.Binary.bitStringToBytes ( String  bitString)
static

Converts a bit-string to bytes.

Parameters
bitStringThe bit-string.

◆ bitStringToBytes() [2/4]

static byte [] fm.liveswitch.Binary.bitStringToBytes ( String  bitString,
boolean  padLeft 
)
static

Converts a bit-string to bytes.

Parameters
bitStringThe bit-string.
padLeftWhether to pad extra zero-bits to the left.

◆ bitStringToBytes() [3/4]

static byte [] fm.liveswitch.Binary.bitStringToBytes ( String  bitString,
boolean  padLeft,
fm.liveswitch.IntegerHolder  numberOfUnusedBits 
)
static

Converts a bit-string to bytes.

Parameters
bitStringThe bit-string.
padLeftWhether to pad extra zero-bits to the left.
numberOfUnusedBitsThe number of unused bits.

◆ bitStringToBytes() [4/4]

static byte [] fm.liveswitch.Binary.bitStringToBytes ( String  bitString,
fm.liveswitch.IntegerHolder  numberOfUnusedBits 
)
static

Converts a bit-string to bytes.

Parameters
bitStringThe bit-string.
numberOfUnusedBitsThe number of unused bits.

◆ bytesToBitString() [1/4]

static String fm.liveswitch.Binary.bytesToBitString ( byte[]  bytes)
static

Converts bytes to a bit-string.

Parameters
bytesThe bytes.

◆ bytesToBitString() [2/4]

static String fm.liveswitch.Binary.bytesToBitString ( byte[]  bytes,
int  offset,
int  length 
)
static

Converts bytes to a bit-string.

Parameters
bytesThe bytes.
offsetThe offset.
lengthThe length.

◆ bytesToBitString() [3/4]

static String fm.liveswitch.Binary.bytesToBitString ( byte[]  bytes,
int  offset,
int  length,
int  numberOfUnusedBits 
)
static

Converts bytes to a bit-string.

Parameters
bytesThe bytes.
offsetThe offset.
lengthThe length.
numberOfUnusedBitsThe number of unused bits.

◆ bytesToBitString() [4/4]

static String fm.liveswitch.Binary.bytesToBitString ( byte[]  bytes,
int  offset,
int  length,
int  numberOfUnusedBits,
boolean  trimLeft 
)
static

Converts bytes to a bit-string.

Parameters
bytesThe bytes.
offsetThe offset.
lengthThe length.
numberOfUnusedBitsThe number of unused bits.
trimLeftWhether to trim unused bits from the left.

◆ deinterleave() [1/3]

static void fm.liveswitch.Binary.deinterleave ( byte[]  inputFrame,
byte[]  outputFrame 
)
static

Deinterleaves a byte array i.e.

XYXYXYXY to XXXXYYYY

Parameters
inputFrameThe inputFrame.
outputFrameThe outputFrame.

◆ deinterleave() [2/3]

static void fm.liveswitch.Binary.deinterleave ( byte[]  inputFrame,
byte[]  outputFrame,
int  start,
int  length 
)
static

Deinterleaves a byte array i.e.

XYXYXYXY to XXXXYYYY

Parameters
inputFrameThe inputFrame.
outputFrameThe outputFrame.
startThe start.
lengthThe length.

◆ deinterleave() [3/3]

static void fm.liveswitch.Binary.deinterleave ( byte[]  inputFrame,
byte[]  outputFrame,
int  start,
int  length,
boolean  reversePlanes 
)
static

Deinterleaves a byte array.

Parameters
inputFrameThe inputFrame.
outputFrameThe outputFrame.
startThe start.
lengthThe length.
reversePlanesThe reversePlanes.

◆ deinterleaveTransform() [1/3]

static void fm.liveswitch.Binary.deinterleaveTransform ( byte[]  inputFrame,
byte[]  outputFrame,
int  width,
int  height,
int  stride,
int  rotation 
)
static

Deinterleave and transform (rotate) a byte array containing two planes.

Parameters
inputFrameThe inputFrame.
outputFrameThe outputFrame.
widthThe width.
heightThe height.
strideThe stride.
rotationValues 0, 90, 180, 270.

◆ deinterleaveTransform() [2/3]

static void fm.liveswitch.Binary.deinterleaveTransform ( byte[]  inputFrame,
byte[]  outputFrame,
int  width,
int  height,
int  stride,
int  rotation,
int  start 
)
static

Deinterleave and transform (rotate) a byte array containing two planes.

Parameters
inputFrameThe inputFrame.
outputFrameThe outputFrame.
widthThe width.
heightThe height.
strideThe stride.
rotationValues 0, 90, 180, 270.
startThe start.

◆ deinterleaveTransform() [3/3]

static void fm.liveswitch.Binary.deinterleaveTransform ( byte[]  inputFrame,
byte[]  outputFrame,
int  width,
int  height,
int  stride,
int  rotation,
int  start,
boolean  reversePlanes 
)
static

Deinterleave and transform (rotate) a byte array containing two planes.

Parameters
inputFrameThe inputFrame.
outputFrameThe outputFrame.
widthThe width.
heightThe height.
strideThe stride.
startThe start.
rotationValues 0, 90, 180, 270.
reversePlanesReverse output plane order.

◆ fromBytes1()

static boolean fm.liveswitch.Binary.fromBytes1 ( byte[]  input,
int  inputIndex,
int  bitOffset 
)
static

Reads a 1-bit value from a byte array.

Parameters
inputThe input byte array.
inputIndexThe index to start reading.
bitOffsetThe offset of the value within the byte.
Returns
The value.

◆ fromBytes10()

static int fm.liveswitch.Binary.fromBytes10 ( byte[]  input,
int  inputIndex,
int  bitOffset 
)
static

Reads a 10-bit value from a byte array.

Parameters
inputThe input byte array.
inputIndexThe index to start reading.
bitOffsetThe offset of the value within the byte.
Returns
The value.

◆ fromBytes11()

static int fm.liveswitch.Binary.fromBytes11 ( byte[]  input,
int  inputIndex,
int  bitOffset 
)
static

Reads a 11-bit value from a byte array.

Parameters
inputThe input byte array.
inputIndexThe index to start reading.
bitOffsetThe offset of the value within the byte.
Returns
The value.

◆ fromBytes12()

static int fm.liveswitch.Binary.fromBytes12 ( byte[]  input,
int  inputIndex,
int  bitOffset 
)
static

Reads a 12-bit value from a byte array.

Parameters
inputThe input byte array.
inputIndexThe index to start reading.
bitOffsetThe offset of the value within the byte.
Returns
The value.

◆ fromBytes13()

static int fm.liveswitch.Binary.fromBytes13 ( byte[]  input,
int  inputIndex,
int  bitOffset 
)
static

Reads a 13-bit value from a byte array.

Parameters
inputThe input byte array.
inputIndexThe index to start reading.
bitOffsetThe offset of the value within the byte.
Returns
The value.

◆ fromBytes14()

static int fm.liveswitch.Binary.fromBytes14 ( byte[]  input,
int  inputIndex,
int  bitOffset 
)
static

Reads a 14-bit value from a byte array.

Parameters
inputThe input byte array.
inputIndexThe index to start reading.
bitOffsetThe offset of the value within the byte.
Returns
The value.

◆ fromBytes15()

static int fm.liveswitch.Binary.fromBytes15 ( byte[]  input,
int  inputIndex,
int  bitOffset 
)
static

Reads a 15-bit value from a byte array.

Parameters
inputThe input byte array.
inputIndexThe index to start reading.
bitOffsetThe offset of the value within the byte.
Returns
The value.

◆ fromBytes16()

static int fm.liveswitch.Binary.fromBytes16 ( byte[]  input,
int  inputIndex,
boolean  littleEndian 
)
static

Reads a 16-bit value from a byte array.

Parameters
inputThe input byte array.
inputIndexThe index to start reading.
littleEndianWhether to use little-endian format.
Returns
The value.

◆ fromBytes17()

static int fm.liveswitch.Binary.fromBytes17 ( byte[]  input,
int  inputIndex,
int  bitOffset 
)
static

Reads an 17-bit value from a byte array.

Parameters
inputThe input byte array.
inputIndexThe index to start reading.
bitOffsetThe offset of the value within the byte.
Returns
The value.

◆ fromBytes18()

static int fm.liveswitch.Binary.fromBytes18 ( byte[]  input,
int  inputIndex,
int  bitOffset 
)
static

Reads an 18-bit value from a byte array.

Parameters
inputThe input byte array.
inputIndexThe index to start reading.
bitOffsetThe offset of the value within the byte.
Returns
The value.

◆ fromBytes19()

static int fm.liveswitch.Binary.fromBytes19 ( byte[]  input,
int  inputIndex,
int  bitOffset 
)
static

Reads an 19-bit value from a byte array.

Parameters
inputThe input byte array.
inputIndexThe index to start reading.
bitOffsetThe offset of the value within the byte.
Returns
The value.

◆ fromBytes2()

static int fm.liveswitch.Binary.fromBytes2 ( byte[]  input,
int  inputIndex,
int  bitOffset 
)
static

Reads a 2-bit value from a byte array.

Parameters
inputThe input byte array.
inputIndexThe index to start reading.
bitOffsetThe offset of the value within the byte.
Returns
The value.

◆ fromBytes20()

static int fm.liveswitch.Binary.fromBytes20 ( byte[]  input,
int  inputIndex,
int  bitOffset 
)
static

Reads an 20-bit value from a byte array.

Parameters
inputThe input byte array.
inputIndexThe index to start reading.
bitOffsetThe offset of the value within the byte.
Returns
The value.

◆ fromBytes21()

static int fm.liveswitch.Binary.fromBytes21 ( byte[]  input,
int  inputIndex,
int  bitOffset 
)
static

Reads an 21-bit value from a byte array.

Parameters
inputThe input byte array.
inputIndexThe index to start reading.
bitOffsetThe offset of the value within the byte.
Returns
The value.

◆ fromBytes22()

static int fm.liveswitch.Binary.fromBytes22 ( byte[]  input,
int  inputIndex,
int  bitOffset 
)
static

Reads an 22-bit value from a byte array.

Parameters
inputThe input byte array.
inputIndexThe index to start reading.
bitOffsetThe offset of the value within the byte.
Returns
The value.

◆ fromBytes23()

static int fm.liveswitch.Binary.fromBytes23 ( byte[]  input,
int  inputIndex,
int  bitOffset 
)
static

Reads an 23-bit value from a byte array.

Parameters
inputThe input byte array.
inputIndexThe index to start reading.
bitOffsetThe offset of the value within the byte.
Returns
The value.

◆ fromBytes24()

static int fm.liveswitch.Binary.fromBytes24 ( byte[]  input,
int  inputIndex,
boolean  littleEndian 
)
static

Reads a 24-bit value from a byte array.

Parameters
inputThe input byte array.
inputIndexThe index to start reading.
littleEndianWhether to use little-endian format.
Returns
The value.

◆ fromBytes3()

static int fm.liveswitch.Binary.fromBytes3 ( byte[]  input,
int  inputIndex,
int  bitOffset 
)
static

Reads a 3-bit value from a byte array.

Parameters
inputThe input byte array.
inputIndexThe index to start reading.
bitOffsetThe offset of the value within the byte.
Returns
The value.

◆ fromBytes32()

static long fm.liveswitch.Binary.fromBytes32 ( byte[]  input,
int  inputIndex,
boolean  littleEndian 
)
static

Reads a 32-bit value from a byte array.

Parameters
inputThe input byte array.
inputIndexThe index to start reading.
littleEndianWhether to use little-endian format.
Returns
The value.

◆ fromBytes4()

static int fm.liveswitch.Binary.fromBytes4 ( byte[]  input,
int  inputIndex,
int  bitOffset 
)
static

Reads a 4-bit value from a byte array.

Parameters
inputThe input byte array.
inputIndexThe index to start reading.
bitOffsetThe offset of the value within the byte.
Returns
The value.

◆ fromBytes40()

static long fm.liveswitch.Binary.fromBytes40 ( byte[]  input,
int  inputIndex,
boolean  littleEndian 
)
static

Reads a 40-bit value from a byte array.

Parameters
inputThe input byte array.
inputIndexThe index to start reading.
littleEndianWhether to use little-endian format.
Returns
The value.

◆ fromBytes48()

static long fm.liveswitch.Binary.fromBytes48 ( byte[]  input,
int  inputIndex,
boolean  littleEndian 
)
static

Reads a 48-bit value from a byte array.

Parameters
inputThe input byte array.
inputIndexThe index to start reading.
littleEndianWhether to use little-endian format.
Returns
The value.

◆ fromBytes5()

static int fm.liveswitch.Binary.fromBytes5 ( byte[]  input,
int  inputIndex,
int  bitOffset 
)
static

Reads a 5-bit value from a byte array.

Parameters
inputThe input byte array.
inputIndexThe index to start reading.
bitOffsetThe offset of the value within the byte.
Returns
The value.

◆ fromBytes56()

static long fm.liveswitch.Binary.fromBytes56 ( byte[]  input,
int  inputIndex,
boolean  littleEndian 
)
static

Reads a 56-bit value from a byte array.

Parameters
inputThe input byte array.
inputIndexThe index to start reading.
littleEndianWhether to use little-endian format.
Returns
The value.

◆ fromBytes6()

static int fm.liveswitch.Binary.fromBytes6 ( byte[]  input,
int  inputIndex,
int  bitOffset 
)
static

Reads a 6-bit value from a byte array.

Parameters
inputThe input byte array.
inputIndexThe index to start reading.
bitOffsetThe offset of the value within the byte.
Returns
The value.

◆ fromBytes64()

static long fm.liveswitch.Binary.fromBytes64 ( byte[]  input,
int  inputIndex,
boolean  littleEndian 
)
static

Reads a 64-bit value from a byte array.

Parameters
inputThe input byte array.
inputIndexThe index to start reading.
littleEndianWhether to use little-endian format.
Returns
The value.

◆ fromBytes7()

static int fm.liveswitch.Binary.fromBytes7 ( byte[]  input,
int  inputIndex,
int  bitOffset 
)
static

Reads a 7-bit value from a byte array.

Parameters
inputThe input byte array.
inputIndexThe index to start reading.
bitOffsetThe offset of the value within the byte.
Returns
The value.

◆ fromBytes8()

static int fm.liveswitch.Binary.fromBytes8 ( byte[]  input,
int  inputIndex 
)
static

Reads an 8-bit value from a byte array.

Parameters
inputThe input byte array.
inputIndexThe index to start reading.
Returns
The value.

◆ fromBytes9()

static int fm.liveswitch.Binary.fromBytes9 ( byte[]  input,
int  inputIndex,
int  bitOffset 
)
static

Reads a 9-bit value from a byte array.

Parameters
inputThe input byte array.
inputIndexThe index to start reading.
bitOffsetThe offset of the value within the byte.
Returns
The value.

◆ interleave() [1/3]

static void fm.liveswitch.Binary.interleave ( byte[]  inputFrame,
byte[]  outputFrame 
)
static

Interleaves a byte array i.e.

XXXXYYYY to XYXYXYXY

Parameters
inputFrameThe inputFrame.
outputFrameThe outputFrame.

◆ interleave() [2/3]

static void fm.liveswitch.Binary.interleave ( byte[]  inputFrame,
byte[]  outputFrame,
int  start,
int  length 
)
static

Interleaves a byte array i.e.

XXXXYYYY to XYXYXYXY

Parameters
inputFrameThe inputFrame.
outputFrameThe outputFrame.
startThe start.
lengthThe length.

◆ interleave() [3/3]

static void fm.liveswitch.Binary.interleave ( byte[]  inputFrame,
byte[]  outputFrame,
int  start,
int  length,
boolean  reversePlanes 
)
static

Interleaves a byte array i.e.

XXXXYYYY to XYXYXYXY

Parameters
inputFrameThe inputFrame.
outputFrameThe outputFrame.
startThe start.
lengthThe length.
reversePlanesXXXXYYYY to YXYXYXYX

◆ interleaveTransform() [1/3]

static void fm.liveswitch.Binary.interleaveTransform ( byte[]  inputFrame,
byte[]  outputFrame,
int  width,
int  height,
int  stride,
int  rotation 
)
static

Interleave and transform (rotate) a byte array containing two planes.

Parameters
inputFrameThe inputFrame.
outputFrameThe outputFrame.
widthThe width.
heightThe height.
strideThe stride.
rotationValues 0, 90, 180, 270.

◆ interleaveTransform() [2/3]

static void fm.liveswitch.Binary.interleaveTransform ( byte[]  inputFrame,
byte[]  outputFrame,
int  width,
int  height,
int  stride,
int  rotation,
int  start 
)
static

Interleave and transform (rotate) a byte array containing two planes.

Parameters
inputFrameThe inputFrame.
outputFrameThe outputFrame.
widthThe width.
heightThe height.
strideThe stride.
rotationValues 0, 90, 180, 270.
startThe start.

◆ interleaveTransform() [3/3]

static void fm.liveswitch.Binary.interleaveTransform ( byte[]  inputFrame,
byte[]  outputFrame,
int  width,
int  height,
int  stride,
int  rotation,
int  start,
boolean  reversePlanes 
)
static

Interleave and transform (rotate) a byte array containing two planes.

Parameters
inputFrameThe inputFrame.
outputFrameThe outputFrame.
widthThe width.
heightThe height.
strideThe stride.
startThe start.
rotationValues 0, 90, 180, 270.
reversePlanesReverse output plane order.

◆ toBytes1() [1/2]

static byte [] fm.liveswitch.Binary.toBytes1 ( boolean  value,
int  bitOffset 
)
static

Converts a 1-bit value to a byte array.

Parameters
valueThe value to write.
bitOffsetThe offset of the value within the byte.
Returns
The output byte array.

◆ toBytes1() [2/2]

static byte [] fm.liveswitch.Binary.toBytes1 ( boolean  value,
int  bitOffset,
byte[]  output,
int  outputIndex 
)
static

Writes a 1-bit value to a byte array.

Parameters
valueThe value to write.
bitOffsetThe offset of the value within the byte.
outputThe output byte array.
outputIndexThe index to start writing.
Returns
The output byte array.

◆ toBytes10() [1/2]

static byte [] fm.liveswitch.Binary.toBytes10 ( int  value,
int  bitOffset,
boolean  littleEndian 
)
static

Converts a 10-bit value to a byte array.

Parameters
valueThe value to write.
bitOffsetThe offset of the value within the byte.
littleEndianWhether to use little-endian format.
Returns
The output byte array.

◆ toBytes10() [2/2]

static byte [] fm.liveswitch.Binary.toBytes10 ( int  value,
int  bitOffset,
boolean  littleEndian,
byte[]  output,
int  outputIndex 
)
static

Writes a 10-bit value to a byte array.

Parameters
valueThe value to write.
bitOffsetThe offset of the value within the byte.
littleEndianWhether to use little-endian format.
outputThe output byte array.
outputIndexThe index to start writing.
Returns
The output byte array.

◆ toBytes11() [1/2]

static byte [] fm.liveswitch.Binary.toBytes11 ( int  value,
int  bitOffset,
boolean  littleEndian 
)
static

Converts a 11-bit value to a byte array.

Parameters
valueThe value to write.
bitOffsetThe offset of the value within the byte.
littleEndianWhether to use little-endian format.
Returns
The output byte array.

◆ toBytes11() [2/2]

static byte [] fm.liveswitch.Binary.toBytes11 ( int  value,
int  bitOffset,
boolean  littleEndian,
byte[]  output,
int  outputIndex 
)
static

Writes a 11-bit value to a byte array.

Parameters
valueThe value to write.
bitOffsetThe offset of the value within the byte.
littleEndianWhether to use little-endian format.
outputThe output byte array.
outputIndexThe index to start writing.
Returns
The output byte array.

◆ toBytes12() [1/2]

static byte [] fm.liveswitch.Binary.toBytes12 ( int  value,
int  bitOffset,
boolean  littleEndian 
)
static

Converts a 12-bit value to a byte array.

Parameters
valueThe value to write.
bitOffsetThe offset of the value within the byte.
littleEndianWhether to use little-endian format.
Returns
The output byte array.

◆ toBytes12() [2/2]

static byte [] fm.liveswitch.Binary.toBytes12 ( int  value,
int  bitOffset,
boolean  littleEndian,
byte[]  output,
int  outputIndex 
)
static

Writes a 12-bit value to a byte array.

Parameters
valueThe value to write.
bitOffsetThe offset of the value within the byte.
littleEndianWhether to use little-endian format.
outputThe output byte array.
outputIndexThe index to start writing.
Returns
The output byte array.

◆ toBytes13() [1/2]

static byte [] fm.liveswitch.Binary.toBytes13 ( int  value,
int  bitOffset,
boolean  littleEndian 
)
static

Converts a 13-bit value to a byte array.

Parameters
valueThe value to write.
bitOffsetThe offset of the value within the byte.
littleEndianWhether to use little-endian format.
Returns
The output byte array.

◆ toBytes13() [2/2]

static byte [] fm.liveswitch.Binary.toBytes13 ( int  value,
int  bitOffset,
boolean  littleEndian,
byte[]  output,
int  outputIndex 
)
static

Writes a 13-bit value to a byte array.

Parameters
valueThe value to write.
bitOffsetThe offset of the value within the byte.
littleEndianWhether to use little-endian format.
outputThe output byte array.
outputIndexThe index to start writing.
Returns
The output byte array.

◆ toBytes14() [1/2]

static byte [] fm.liveswitch.Binary.toBytes14 ( int  value,
int  bitOffset,
boolean  littleEndian 
)
static

Converts a 14-bit value to a byte array.

Parameters
valueThe value to write.
bitOffsetThe offset of the value within the byte.
littleEndianWhether to use little-endian format.
Returns
The output byte array.

◆ toBytes14() [2/2]

static byte [] fm.liveswitch.Binary.toBytes14 ( int  value,
int  bitOffset,
boolean  littleEndian,
byte[]  output,
int  outputIndex 
)
static

Writes a 14-bit value to a byte array.

Parameters
valueThe value to write.
bitOffsetThe offset of the value within the byte.
littleEndianWhether to use little-endian format.
outputThe output byte array.
outputIndexThe index to start writing.
Returns
The output byte array.

◆ toBytes15() [1/2]

static byte [] fm.liveswitch.Binary.toBytes15 ( int  value,
int  bitOffset,
boolean  littleEndian 
)
static

Converts a 15-bit value to a byte array.

Parameters
valueThe value to write.
bitOffsetThe offset of the value within the byte.
littleEndianWhether to use little-endian format.
Returns
The output byte array.

◆ toBytes15() [2/2]

static byte [] fm.liveswitch.Binary.toBytes15 ( int  value,
int  bitOffset,
boolean  littleEndian,
byte[]  output,
int  outputIndex 
)
static

Writes a 15-bit value to a byte array.

Parameters
valueThe value to write.
bitOffsetThe offset of the value within the byte.
littleEndianWhether to use little-endian format.
outputThe output byte array.
outputIndexThe index to start writing.
Returns
The output byte array.

◆ toBytes16() [1/2]

static byte [] fm.liveswitch.Binary.toBytes16 ( int  value,
boolean  littleEndian 
)
static

Converts a 16-bit value to a byte array.

Parameters
valueThe value to write.
littleEndianWhether to use little-endian format.
Returns
The output byte array.

◆ toBytes16() [2/2]

static byte [] fm.liveswitch.Binary.toBytes16 ( int  value,
boolean  littleEndian,
byte[]  output,
int  outputIndex 
)
static

Writes a 16-bit value to a byte array.

Parameters
valueThe value to write.
littleEndianWhether to use little-endian format.
outputThe output byte array.
outputIndexThe index to start writing.
Returns
The output byte array.

◆ toBytes17() [1/2]

static byte [] fm.liveswitch.Binary.toBytes17 ( int  value,
int  bitOffset,
boolean  littleEndian 
)
static

Converts a 17-bit value to a byte array.

Parameters
valueThe value to write.
bitOffsetThe offset of the value within the byte.
littleEndianWhether to use little-endian format.
Returns
The output byte array.

◆ toBytes17() [2/2]

static byte [] fm.liveswitch.Binary.toBytes17 ( int  value,
int  bitOffset,
boolean  littleEndian,
byte[]  output,
int  outputIndex 
)
static

Writes a 17-bit value to a byte array.

Parameters
valueThe value to write.
bitOffsetThe offset of the value within the byte.
littleEndianWhether to use little-endian format.
outputThe output byte array.
outputIndexThe index to start writing.
Returns
The output byte array.

◆ toBytes18() [1/2]

static byte [] fm.liveswitch.Binary.toBytes18 ( int  value,
int  bitOffset,
boolean  littleEndian 
)
static

Converts an 18-bit value to a byte array.

Parameters
valueThe value to write.
bitOffsetThe offset of the value within the byte.
littleEndianWhether to use little-endian format.
Returns
The output byte array.

◆ toBytes18() [2/2]

static byte [] fm.liveswitch.Binary.toBytes18 ( int  value,
int  bitOffset,
boolean  littleEndian,
byte[]  output,
int  outputIndex 
)
static

Writes an 18-bit value to a byte array.

Parameters
valueThe value to write.
bitOffsetThe offset of the value within the byte.
littleEndianWhether to use little-endian format.
outputThe output byte array.
outputIndexThe index to start writing.
Returns
The output byte array.

◆ toBytes19() [1/2]

static byte [] fm.liveswitch.Binary.toBytes19 ( int  value,
int  bitOffset,
boolean  littleEndian 
)
static

Converts a 19-bit value to a byte array.

Parameters
valueThe value to write.
bitOffsetThe offset of the value within the byte.
littleEndianWhether to use little-endian format.
Returns
The output byte array.

◆ toBytes19() [2/2]

static byte [] fm.liveswitch.Binary.toBytes19 ( int  value,
int  bitOffset,
boolean  littleEndian,
byte[]  output,
int  outputIndex 
)
static

Writes a 19-bit value to a byte array.

Parameters
valueThe value to write.
bitOffsetThe offset of the value within the byte.
littleEndianWhether to use little-endian format.
outputThe output byte array.
outputIndexThe index to start writing.
Returns
The output byte array.

◆ toBytes2() [1/2]

static byte [] fm.liveswitch.Binary.toBytes2 ( int  value,
int  bitOffset 
)
static

Converts a 2-bit value to a byte array.

Parameters
valueThe value to write.
bitOffsetThe offset of the value within the byte.
Returns
The output byte array.

◆ toBytes2() [2/2]

static byte [] fm.liveswitch.Binary.toBytes2 ( int  value,
int  bitOffset,
byte[]  output,
int  outputIndex 
)
static

Writes a 2-bit value to a byte array.

Parameters
valueThe value to write.
bitOffsetThe offset of the value within the byte.
outputThe output byte array.
outputIndexThe index to start writing.
Returns
The output byte array.

◆ toBytes20() [1/2]

static byte [] fm.liveswitch.Binary.toBytes20 ( int  value,
int  bitOffset,
boolean  littleEndian 
)
static

Converts a 20-bit value to a byte array.

Parameters
valueThe value to write.
bitOffsetThe offset of the value within the byte.
littleEndianWhether to use little-endian format.
Returns
The output byte array.

◆ toBytes20() [2/2]

static byte [] fm.liveswitch.Binary.toBytes20 ( int  value,
int  bitOffset,
boolean  littleEndian,
byte[]  output,
int  outputIndex 
)
static

Writes a 20-bit value to a byte array.

Parameters
valueThe value to write.
bitOffsetThe offset of the value within the byte.
littleEndianWhether to use little-endian format.
outputThe output byte array.
outputIndexThe index to start writing.
Returns
The output byte array.

◆ toBytes21() [1/2]

static byte [] fm.liveswitch.Binary.toBytes21 ( int  value,
int  bitOffset,
boolean  littleEndian 
)
static

Converts a 21-bit value to a byte array.

Parameters
valueThe value to write.
bitOffsetThe offset of the value within the byte.
littleEndianWhether to use little-endian format.
Returns
The output byte array.

◆ toBytes21() [2/2]

static byte [] fm.liveswitch.Binary.toBytes21 ( int  value,
int  bitOffset,
boolean  littleEndian,
byte[]  output,
int  outputIndex 
)
static

Writes a 21-bit value to a byte array.

Parameters
valueThe value to write.
bitOffsetThe offset of the value within the byte.
littleEndianWhether to use little-endian format.
outputThe output byte array.
outputIndexThe index to start writing.
Returns
The output byte array.

◆ toBytes22() [1/2]

static byte [] fm.liveswitch.Binary.toBytes22 ( int  value,
int  bitOffset,
boolean  littleEndian 
)
static

Converts a 22-bit value to a byte array.

Parameters
valueThe value to write.
bitOffsetThe offset of the value within the byte.
littleEndianWhether to use little-endian format.
Returns
The output byte array.

◆ toBytes22() [2/2]

static byte [] fm.liveswitch.Binary.toBytes22 ( int  value,
int  bitOffset,
boolean  littleEndian,
byte[]  output,
int  outputIndex 
)
static

Writes a 22-bit value to a byte array.

Parameters
valueThe value to write.
bitOffsetThe offset of the value within the byte.
littleEndianWhether to use little-endian format.
outputThe output byte array.
outputIndexThe index to start writing.
Returns
The output byte array.

◆ toBytes23() [1/2]

static byte [] fm.liveswitch.Binary.toBytes23 ( int  value,
int  bitOffset,
boolean  littleEndian 
)
static

Converts a 23-bit value to a byte array.

Parameters
valueThe value to write.
bitOffsetThe offset of the value within the byte.
littleEndianWhether to use little-endian format.
Returns
The output byte array.

◆ toBytes23() [2/2]

static byte [] fm.liveswitch.Binary.toBytes23 ( int  value,
int  bitOffset,
boolean  littleEndian,
byte[]  output,
int  outputIndex 
)
static

Writes a 23-bit value to a byte array.

Parameters
valueThe value to write.
bitOffsetThe offset of the value within the byte.
littleEndianWhether to use little-endian format.
outputThe output byte array.
outputIndexThe index to start writing.
Returns
The output byte array.

◆ toBytes24() [1/2]

static byte [] fm.liveswitch.Binary.toBytes24 ( int  value,
boolean  littleEndian 
)
static

Converts a 24-bit value to a byte array.

Parameters
valueThe value to write.
littleEndianWhether to use little-endian format.
Returns
The output byte array.

◆ toBytes24() [2/2]

static byte [] fm.liveswitch.Binary.toBytes24 ( int  value,
boolean  littleEndian,
byte[]  output,
int  outputIndex 
)
static

Writes a 24-bit value to a byte array.

Parameters
valueThe value to write.
littleEndianWhether to use little-endian format.
outputThe output byte array.
outputIndexThe index to start writing.
Returns
The output byte array.

◆ toBytes3() [1/2]

static byte [] fm.liveswitch.Binary.toBytes3 ( int  value,
int  bitOffset 
)
static

Converts a 3-bit value to a byte array.

Parameters
valueThe value to write.
bitOffsetThe offset of the value within the byte.
Returns
The output byte array.

◆ toBytes3() [2/2]

static byte [] fm.liveswitch.Binary.toBytes3 ( int  value,
int  bitOffset,
byte[]  output,
int  outputIndex 
)
static

Writes a 3-bit value to a byte array.

Parameters
valueThe value to write.
bitOffsetThe offset of the value within the byte.
outputThe output byte array.
outputIndexThe index to start writing.
Returns
The output byte array.

◆ toBytes32() [1/2]

static byte [] fm.liveswitch.Binary.toBytes32 ( long  value,
boolean  littleEndian 
)
static

Converts a 32-bit value to a byte array.

Parameters
valueThe value to write.
littleEndianWhether to use little-endian format.
Returns
The output byte array.

◆ toBytes32() [2/2]

static byte [] fm.liveswitch.Binary.toBytes32 ( long  value,
boolean  littleEndian,
byte[]  output,
int  outputIndex 
)
static

Writes a 32-bit value to a byte array.

Parameters
valueThe value to write.
littleEndianWhether to use little-endian format.
outputThe output byte array.
outputIndexThe index to start writing.
Returns
The output byte array.

◆ toBytes4() [1/2]

static byte [] fm.liveswitch.Binary.toBytes4 ( int  value,
int  bitOffset 
)
static

Converts a 4-bit value to a byte array.

Parameters
valueThe value to write.
bitOffsetThe offset of the value within the byte.
Returns
The output byte array.

◆ toBytes4() [2/2]

static byte [] fm.liveswitch.Binary.toBytes4 ( int  value,
int  bitOffset,
byte[]  output,
int  outputIndex 
)
static

Writes a 4-bit value to a byte array.

Parameters
valueThe value to write.
bitOffsetThe offset of the value within the byte.
outputThe output byte array.
outputIndexThe index to start writing.
Returns
The output byte array.

◆ toBytes40() [1/2]

static byte [] fm.liveswitch.Binary.toBytes40 ( long  value,
boolean  littleEndian 
)
static

Converts a 40-bit value to a byte array.

Parameters
valueThe value to write.
littleEndianWhether to use little-endian format.
Returns
The output byte array.

◆ toBytes40() [2/2]

static byte [] fm.liveswitch.Binary.toBytes40 ( long  value,
boolean  littleEndian,
byte[]  output,
int  outputIndex 
)
static

Writes a 40-bit value to a byte array.

Parameters
valueThe value to write.
littleEndianWhether to use little-endian format.
outputThe output byte array.
outputIndexThe index to start writing.
Returns
The output byte array.

◆ toBytes48() [1/2]

static byte [] fm.liveswitch.Binary.toBytes48 ( long  value,
boolean  littleEndian 
)
static

Converts a 48-bit value to a byte array.

Parameters
valueThe value to write.
littleEndianWhether to use little-endian format.
Returns
The output byte array.

◆ toBytes48() [2/2]

static byte [] fm.liveswitch.Binary.toBytes48 ( long  value,
boolean  littleEndian,
byte[]  output,
int  outputIndex 
)
static

Writes a 48-bit value to a byte array.

Parameters
valueThe value to write.
littleEndianWhether to use little-endian format.
outputThe output byte array.
outputIndexThe index to start writing.
Returns
The output byte array.

◆ toBytes5() [1/2]

static byte [] fm.liveswitch.Binary.toBytes5 ( int  value,
int  bitOffset 
)
static

Converts a 5-bit value to a byte array.

Parameters
valueThe value to write.
bitOffsetThe offset of the value within the byte.
Returns
The output byte array.

◆ toBytes5() [2/2]

static byte [] fm.liveswitch.Binary.toBytes5 ( int  value,
int  bitOffset,
byte[]  output,
int  outputIndex 
)
static

Writes a 5-bit value to a byte array.

Parameters
valueThe value to write.
bitOffsetThe offset of the value within the byte.
outputThe output byte array.
outputIndexThe index to start writing.
Returns
The output byte array.

◆ toBytes56() [1/2]

static byte [] fm.liveswitch.Binary.toBytes56 ( long  value,
boolean  littleEndian 
)
static

Converts a 56-bit value to a byte array.

Parameters
valueThe value to write.
littleEndianWhether to use little-endian format.
Returns
The output byte array.

◆ toBytes56() [2/2]

static byte [] fm.liveswitch.Binary.toBytes56 ( long  value,
boolean  littleEndian,
byte[]  output,
int  outputIndex 
)
static

Writes a 56-bit value to a byte array.

Parameters
valueThe value to write.
littleEndianWhether to use little-endian format.
outputThe output byte array.
outputIndexThe index to start writing.
Returns
The output byte array.

◆ toBytes6() [1/2]

static byte [] fm.liveswitch.Binary.toBytes6 ( int  value,
int  bitOffset 
)
static

Converts a 6-bit value to a byte array.

Parameters
valueThe value to write.
bitOffsetThe offset of the value within the byte.
Returns
The output byte array.

◆ toBytes6() [2/2]

static byte [] fm.liveswitch.Binary.toBytes6 ( int  value,
int  bitOffset,
byte[]  output,
int  outputIndex 
)
static

Writes a 6-bit value to a byte array.

Parameters
valueThe value to write.
bitOffsetThe offset of the value within the byte.
outputThe output byte array.
outputIndexThe index to start writing.
Returns
The output byte array.

◆ toBytes64() [1/2]

static byte [] fm.liveswitch.Binary.toBytes64 ( long  value,
boolean  littleEndian 
)
static

Converts a 64-bit value to a byte array.

Parameters
valueThe value to write.
littleEndianWhether to use little-endian format.
Returns
The output byte array.

◆ toBytes64() [2/2]

static byte [] fm.liveswitch.Binary.toBytes64 ( long  value,
boolean  littleEndian,
byte[]  output,
int  outputIndex 
)
static

Writes a 64-bit value to a byte array.

Parameters
valueThe value to write.
littleEndianWhether to use little-endian format.
outputThe output byte array.
outputIndexThe index to start writing.
Returns
The output byte array.

◆ toBytes7() [1/2]

static byte [] fm.liveswitch.Binary.toBytes7 ( int  value,
int  bitOffset 
)
static

Converts a 7-bit value to a byte array.

Parameters
valueThe value to write.
bitOffsetThe offset of the value within the byte.
Returns
The output byte array.

◆ toBytes7() [2/2]

static byte [] fm.liveswitch.Binary.toBytes7 ( int  value,
int  bitOffset,
byte[]  output,
int  outputIndex 
)
static

Writes a 7-bit value to a byte array.

Parameters
valueThe value to write.
bitOffsetThe offset of the value within the byte.
outputThe output byte array.
outputIndexThe index to start writing.
Returns
The output byte array.

◆ toBytes8() [1/2]

static byte [] fm.liveswitch.Binary.toBytes8 ( int  value)
static

Converts an 8-bit value to a byte array.

Parameters
valueThe value to write.
Returns
The output byte array.

◆ toBytes8() [2/2]

static byte [] fm.liveswitch.Binary.toBytes8 ( int  value,
byte[]  output,
int  outputIndex 
)
static

Writes an 8-bit value to a byte array.

Parameters
valueThe value to write.
outputThe output byte array.
outputIndexThe index to start writing.
Returns
The output byte array.

◆ toBytes9() [1/2]

static byte [] fm.liveswitch.Binary.toBytes9 ( int  value,
int  bitOffset,
boolean  littleEndian 
)
static

Converts a 9-bit value to a byte array.

Parameters
valueThe value to write.
bitOffsetThe offset of the value within the byte.
littleEndianWhether to use little-endian format.
Returns
The output byte array.

◆ toBytes9() [2/2]

static byte [] fm.liveswitch.Binary.toBytes9 ( int  value,
int  bitOffset,
boolean  littleEndian,
byte[]  output,
int  outputIndex 
)
static

Writes a 9-bit value to a byte array.

Parameters
valueThe value to write.
bitOffsetThe offset of the value within the byte.
littleEndianWhether to use little-endian format.
outputThe output byte array.
outputIndexThe index to start writing.
Returns
The output byte array.

◆ transform() [1/4]

static void fm.liveswitch.Binary.transform ( byte[]  inputFrame,
byte[]  outputFrame,
int  width,
int  height,
int  stride,
int  rotation 
)
static

Transforms a byte containing a 2D plane (rotates 90, 180, 270)

Parameters
inputFrameThe inputFrame.
outputFrameThe outputFrame.
rotationThe rotation.
widthThe width.
heightThe height.
strideThe stride.

◆ transform() [2/4]

static void fm.liveswitch.Binary.transform ( byte[]  inputFrame,
byte[]  outputFrame,
int  width,
int  height,
int  stride,
int  rotation,
int  inputStart,
int  outputStart 
)
static

Transforms a byte containing a 2D plane (rotates 90, 180, 270)

Parameters
inputFrameThe inputFrame.
outputFrameThe outputFrame.
rotationThe rotation.
widthThe width.
heightThe height.
strideThe stride.
inputStartThe inputStart.
outputStartThe outputStart.

◆ transform() [3/4]

static void fm.liveswitch.Binary.transform ( byte[]  inputFrame,
byte[]  outputFrame,
int  width,
int  height,
int  stride,
int  rotation,
int  inputStart,
int  outputStart,
int  chunkLength 
)
static

Transforms a byte containing a 2D plane (rotates 90, 180, 270).

When transforming interleaved planes. Set the chunkLength to the number of planes.

Parameters
inputFrameThe inputFrame.
outputFrameThe outputFrame.
rotationThe rotation.
widthThe width.
heightThe height.
strideThe stride.
inputStartThe inputStart.
outputStartThe outputStart.
chunkLengthThe chunkLength.

◆ transform() [4/4]

static void fm.liveswitch.Binary.transform ( byte[]  inputFrame,
byte[]  outputFrame,
int  width,
int  height,
int  stride,
int  rotation,
int  start 
)
static

Transforms a byte containing a 2D plane (rotates 90, 180, 270)

Parameters
inputFrameThe inputFrame.
outputFrameThe outputFrame.
rotationThe rotation.
widthThe width.
heightThe height.
strideThe stride.
startStart position for both input and output frame

◆ tryFromBytes1()

static boolean fm.liveswitch.Binary.tryFromBytes1 ( byte[]  input,
int  inputIndex,
int  bitOffset,
fm.liveswitch.BooleanHolder  value 
)
static

Tries to read a 1-bit value from a byte array.

Parameters
inputThe input byte array.
inputIndexThe index to start reading.
bitOffsetThe offset of the value within the byte.
valueThe value.
Returns
true
if the index is valid and the value was read; otherwise,
false

◆ tryFromBytes10()

static boolean fm.liveswitch.Binary.tryFromBytes10 ( byte[]  input,
int  inputIndex,
int  bitOffset,
fm.liveswitch.IntegerHolder  value 
)
static

Tries to read a 10-bit value from a byte array.

Parameters
inputThe input byte array.
inputIndexThe index to start reading.
bitOffsetThe offset of the value within the byte.
valueThe value.
Returns
true
if the index is valid and the value was read; otherwise,
false

◆ tryFromBytes11()

static boolean fm.liveswitch.Binary.tryFromBytes11 ( byte[]  input,
int  inputIndex,
int  bitOffset,
fm.liveswitch.IntegerHolder  value 
)
static

Tries to read a 11-bit value from a byte array.

Parameters
inputThe input byte array.
inputIndexThe index to start reading.
bitOffsetThe offset of the value within the byte.
valueThe value.
Returns
true
if the index is valid and the value was read; otherwise,
false

◆ tryFromBytes12()

static boolean fm.liveswitch.Binary.tryFromBytes12 ( byte[]  input,
int  inputIndex,
int  bitOffset,
fm.liveswitch.IntegerHolder  value 
)
static

Tries to read a 12-bit value from a byte array.

Parameters
inputThe input byte array.
inputIndexThe index to start reading.
bitOffsetThe offset of the value within the byte.
valueThe value.
Returns
true
if the index is valid and the value was read; otherwise,
false

◆ tryFromBytes13()

static boolean fm.liveswitch.Binary.tryFromBytes13 ( byte[]  input,
int  inputIndex,
int  bitOffset,
fm.liveswitch.IntegerHolder  value 
)
static

Tries to read a 13-bit value from a byte array.

Parameters
inputThe input byte array.
inputIndexThe index to start reading.
bitOffsetThe offset of the value within the byte.
valueThe value.
Returns
true
if the index is valid and the value was read; otherwise,
false

◆ tryFromBytes14()

static boolean fm.liveswitch.Binary.tryFromBytes14 ( byte[]  input,
int  inputIndex,
int  bitOffset,
fm.liveswitch.IntegerHolder  value 
)
static

Tries to read a 14-bit value from a byte array.

Parameters
inputThe input byte array.
inputIndexThe index to start reading.
bitOffsetThe offset of the value within the byte.
valueThe value.
Returns
true
if the index is valid and the value was read; otherwise,
false

◆ tryFromBytes15()

static boolean fm.liveswitch.Binary.tryFromBytes15 ( byte[]  input,
int  inputIndex,
int  bitOffset,
fm.liveswitch.IntegerHolder  value 
)
static

Tries to read a 15-bit value from a byte array.

Parameters
inputThe input byte array.
inputIndexThe index to start reading.
bitOffsetThe offset of the value within the byte.
valueThe value.
Returns
true
if the index is valid and the value was read; otherwise,
false

◆ tryFromBytes16()

static boolean fm.liveswitch.Binary.tryFromBytes16 ( byte[]  input,
int  inputIndex,
boolean  littleEndian,
fm.liveswitch.IntegerHolder  value 
)
static

Tries to read a 16-bit value from a byte array.

Parameters
inputThe input byte array.
inputIndexThe index to start reading.
littleEndianWhether to use little-endian format.
valueThe value.
Returns
true
if the index is valid and the value was read; otherwise,
false

◆ tryFromBytes17()

static boolean fm.liveswitch.Binary.tryFromBytes17 ( byte[]  input,
int  inputIndex,
int  bitOffset,
fm.liveswitch.IntegerHolder  value 
)
static

Tries to read a 17-bit value from a byte array.

Parameters
inputThe input byte array.
inputIndexThe index to start reading.
bitOffsetThe offset of the value within the byte.
valueThe value.
Returns
true
if the index is valid and the value was read; otherwise,
false

◆ tryFromBytes18()

static boolean fm.liveswitch.Binary.tryFromBytes18 ( byte[]  input,
int  inputIndex,
int  bitOffset,
fm.liveswitch.IntegerHolder  value 
)
static

Tries to read a 18-bit value from a byte array.

Parameters
inputThe input byte array.
inputIndexThe index to start reading.
bitOffsetThe offset of the value within the byte.
valueThe value.
Returns
true
if the index is valid and the value was read; otherwise,
false

◆ tryFromBytes19()

static boolean fm.liveswitch.Binary.tryFromBytes19 ( byte[]  input,
int  inputIndex,
int  bitOffset,
fm.liveswitch.IntegerHolder  value 
)
static

Tries to read a 19-bit value from a byte array.

Parameters
inputThe input byte array.
inputIndexThe index to start reading.
bitOffsetThe offset of the value within the byte.
valueThe value.
Returns
true
if the index is valid and the value was read; otherwise,
false

◆ tryFromBytes2()

static boolean fm.liveswitch.Binary.tryFromBytes2 ( byte[]  input,
int  inputIndex,
int  bitOffset,
fm.liveswitch.IntegerHolder  value 
)
static

Tries to read a 2-bit value from a byte array.

Parameters
inputThe input byte array.
inputIndexThe index to start reading.
bitOffsetThe offset of the value within the byte.
valueThe value.
Returns
true
if the index is valid and the value was read; otherwise,
false

◆ tryFromBytes20()

static boolean fm.liveswitch.Binary.tryFromBytes20 ( byte[]  input,
int  inputIndex,
int  bitOffset,
fm.liveswitch.IntegerHolder  value 
)
static

Tries to read a 20-bit value from a byte array.

Parameters
inputThe input byte array.
inputIndexThe index to start reading.
bitOffsetThe offset of the value within the byte.
valueThe value.
Returns
true
if the index is valid and the value was read; otherwise,
false

◆ tryFromBytes21()

static boolean fm.liveswitch.Binary.tryFromBytes21 ( byte[]  input,
int  inputIndex,
int  bitOffset,
fm.liveswitch.IntegerHolder  value 
)
static

Tries to read a 21-bit value from a byte array.

Parameters
inputThe input byte array.
inputIndexThe index to start reading.
bitOffsetThe offset of the value within the byte.
valueThe value.
Returns
true
if the index is valid and the value was read; otherwise,
false

◆ tryFromBytes22()

static boolean fm.liveswitch.Binary.tryFromBytes22 ( byte[]  input,
int  inputIndex,
int  bitOffset,
fm.liveswitch.IntegerHolder  value 
)
static

Tries to read a 22-bit value from a byte array.

Parameters
inputThe input byte array.
inputIndexThe index to start reading.
bitOffsetThe offset of the value within the byte.
valueThe value.
Returns
true
if the index is valid and the value was read; otherwise,
false

◆ tryFromBytes23()

static boolean fm.liveswitch.Binary.tryFromBytes23 ( byte[]  input,
int  inputIndex,
int  bitOffset,
fm.liveswitch.IntegerHolder  value 
)
static

Tries to read a 23-bit value from a byte array.

Parameters
inputThe input byte array.
inputIndexThe index to start reading.
bitOffsetThe offset of the value within the byte.
valueThe value.
Returns
true
if the index is valid and the value was read; otherwise,
false

◆ tryFromBytes24()

static boolean fm.liveswitch.Binary.tryFromBytes24 ( byte[]  input,
int  inputIndex,
boolean  littleEndian,
fm.liveswitch.IntegerHolder  value 
)
static

Tries to read a 24-bit value from a byte array.

Parameters
inputThe input byte array.
inputIndexThe index to start reading.
littleEndianWhether to use little-endian format.
valueThe value.
Returns
true
if the index is valid and the value was read; otherwise,
false

◆ tryFromBytes3()

static boolean fm.liveswitch.Binary.tryFromBytes3 ( byte[]  input,
int  inputIndex,
int  bitOffset,
fm.liveswitch.IntegerHolder  value 
)
static

Tries to read a 3-bit value from a byte array.

Parameters
inputThe input byte array.
inputIndexThe index to start reading.
bitOffsetThe offset of the value within the byte.
valueThe value.
Returns
true
if the index is valid and the value was read; otherwise,
false

◆ tryFromBytes32()

static boolean fm.liveswitch.Binary.tryFromBytes32 ( byte[]  input,
int  inputIndex,
boolean  littleEndian,
fm.liveswitch.LongHolder  value 
)
static

Tries to read a 32-bit value from a byte array.

Parameters
inputThe input byte array.
inputIndexThe index to start reading.
littleEndianWhether to use little-endian format.
valueThe value.
Returns
true
if the index is valid and the value was read; otherwise,
false

◆ tryFromBytes4()

static boolean fm.liveswitch.Binary.tryFromBytes4 ( byte[]  input,
int  inputIndex,
int  bitOffset,
fm.liveswitch.IntegerHolder  value 
)
static

Tries to read a 4-bit value from a byte array.

Parameters
inputThe input byte array.
inputIndexThe index to start reading.
bitOffsetThe offset of the value within the byte.
valueThe value.
Returns
true
if the index is valid and the value was read; otherwise,
false

◆ tryFromBytes40()

static boolean fm.liveswitch.Binary.tryFromBytes40 ( byte[]  input,
int  inputIndex,
boolean  littleEndian,
fm.liveswitch.LongHolder  value 
)
static

Tries to read a 40-bit value from a byte array.

Parameters
inputThe input byte array.
inputIndexThe index to start reading.
littleEndianWhether to use little-endian format.
valueThe value.
Returns
true
if the index is valid and the value was read; otherwise,
false

◆ tryFromBytes48()

static boolean fm.liveswitch.Binary.tryFromBytes48 ( byte[]  input,
int  inputIndex,
boolean  littleEndian,
fm.liveswitch.LongHolder  value 
)
static

Tries to read a 48-bit value from a byte array.

Parameters
inputThe input byte array.
inputIndexThe index to start reading.
littleEndianWhether to use little-endian format.
valueThe value.
Returns
true
if the index is valid and the value was read; otherwise,
false

◆ tryFromBytes5()

static boolean fm.liveswitch.Binary.tryFromBytes5 ( byte[]  input,
int  inputIndex,
int  bitOffset,
fm.liveswitch.IntegerHolder  value 
)
static

Tries to read a 5-bit value from a byte array.

Parameters
inputThe input byte array.
inputIndexThe index to start reading.
bitOffsetThe offset of the value within the byte.
valueThe value.
Returns
true
if the index is valid and the value was read; otherwise,
false

◆ tryFromBytes56()

static boolean fm.liveswitch.Binary.tryFromBytes56 ( byte[]  input,
int  inputIndex,
boolean  littleEndian,
fm.liveswitch.LongHolder  value 
)
static

Tries to read a 56-bit value from a byte array.

Parameters
inputThe input byte array.
inputIndexThe index to start reading.
littleEndianWhether to use little-endian format.
valueThe value.
Returns
true
if the index is valid and the value was read; otherwise,
false

◆ tryFromBytes6()

static boolean fm.liveswitch.Binary.tryFromBytes6 ( byte[]  input,
int  inputIndex,
int  bitOffset,
fm.liveswitch.IntegerHolder  value 
)
static

Tries to read a 6-bit value from a byte array.

Parameters
inputThe input byte array.
inputIndexThe index to start reading.
bitOffsetThe offset of the value within the byte.
valueThe value.
Returns
true
if the index is valid and the value was read; otherwise,
false

◆ tryFromBytes64()

static boolean fm.liveswitch.Binary.tryFromBytes64 ( byte[]  input,
int  inputIndex,
boolean  littleEndian,
fm.liveswitch.LongHolder  value 
)
static

Tries to read a 64-bit value from a byte array.

Parameters
inputThe input byte array.
inputIndexThe index to start reading.
littleEndianWhether to use little-endian format.
valueThe value.
Returns
true
if the index is valid and the value was read; otherwise,
false

◆ tryFromBytes7()

static boolean fm.liveswitch.Binary.tryFromBytes7 ( byte[]  input,
int  inputIndex,
int  bitOffset,
fm.liveswitch.IntegerHolder  value 
)
static

Tries to read a 7-bit value from a byte array.

Parameters
inputThe input byte array.
inputIndexThe index to start reading.
bitOffsetThe offset of the value within the byte.
valueThe value.
Returns
true
if the index is valid and the value was read; otherwise,
false

◆ tryFromBytes8()

static boolean fm.liveswitch.Binary.tryFromBytes8 ( byte[]  input,
int  inputIndex,
fm.liveswitch.IntegerHolder  value 
)
static

Tries to read an 8-bit value from a byte array.

Parameters
inputThe input byte array.
inputIndexThe index to start reading.
valueThe value.
Returns
true
if the index is valid and the value was read; otherwise,
false

◆ tryFromBytes9()

static boolean fm.liveswitch.Binary.tryFromBytes9 ( byte[]  input,
int  inputIndex,
int  bitOffset,
fm.liveswitch.IntegerHolder  value 
)
static

Tries to read a 9-bit value from a byte array.

Parameters
inputThe input byte array.
inputIndexThe index to start reading.
bitOffsetThe offset of the value within the byte.
valueThe value.
Returns
true
if the index is valid and the value was read; otherwise,
false