FMLiveSwitchBinary Class Reference

Common binary methods. More...

Instance Methods

(instancetype) - init
 

Class Methods

(FMLiveSwitchBinary *) + binary
 
(NSMutableData *) + bitStringToBytesWithBitString:
 Converts a bit-string to bytes. More...
 
(NSMutableData *) + bitStringToBytesWithBitString:numberOfUnusedBits:
 Converts a bit-string to bytes. More...
 
(NSMutableData *) + bitStringToBytesWithBitString:padLeft:
 Converts a bit-string to bytes. More...
 
(NSMutableData *) + bitStringToBytesWithBitString:padLeft:numberOfUnusedBits:
 Converts a bit-string to bytes. More...
 
(NSString *) + bytesToBitStringWithBytes:
 Converts bytes to a bit-string. More...
 
(NSString *) + bytesToBitStringWithBytes:offset:length:
 Converts bytes to a bit-string. More...
 
(NSString *) + bytesToBitStringWithBytes:offset:length:numberOfUnusedBits:
 Converts bytes to a bit-string. More...
 
(NSString *) + bytesToBitStringWithBytes:offset:length:numberOfUnusedBits:trimLeft:
 Converts bytes to a bit-string. More...
 
(void) + deinterleaveTransformWithInputFrame:outputFrame:width:height:stride:rotation:
 Deinterleave and transform (rotate) a byte array containing two planes. More...
 
(void) + deinterleaveTransformWithInputFrame:outputFrame:width:height:stride:rotation:start:
 Deinterleave and transform (rotate) a byte array containing two planes. More...
 
(void) + deinterleaveTransformWithInputFrame:outputFrame:width:height:stride:rotation:start:reversePlanes:
 Deinterleave and transform (rotate) a byte array containing two planes. More...
 
(void) + deinterleaveWithInputFrame:outputFrame:
 Deinterleaves a byte array i.e. More...
 
(void) + deinterleaveWithInputFrame:outputFrame:start:length:
 Deinterleaves a byte array i.e. More...
 
(void) + deinterleaveWithInputFrame:outputFrame:start:length:reversePlanes:
 Deinterleaves a byte array. More...
 
(int) + fromBytes10WithInput:inputIndex:bitOffset:
 Reads a 10-bit value from a byte array. More...
 
(int) + fromBytes11WithInput:inputIndex:bitOffset:
 Reads a 11-bit value from a byte array. More...
 
(int) + fromBytes12WithInput:inputIndex:bitOffset:
 Reads a 12-bit value from a byte array. More...
 
(int) + fromBytes13WithInput:inputIndex:bitOffset:
 Reads a 13-bit value from a byte array. More...
 
(int) + fromBytes14WithInput:inputIndex:bitOffset:
 Reads a 14-bit value from a byte array. More...
 
(int) + fromBytes15WithInput:inputIndex:bitOffset:
 Reads a 15-bit value from a byte array. More...
 
(int) + fromBytes16WithInput:inputIndex:littleEndian:
 Reads a 16-bit value from a byte array. More...
 
(int) + fromBytes17WithInput:inputIndex:bitOffset:
 Reads an 17-bit value from a byte array. More...
 
(int) + fromBytes18WithInput:inputIndex:bitOffset:
 Reads an 18-bit value from a byte array. More...
 
(int) + fromBytes19WithInput:inputIndex:bitOffset:
 Reads an 19-bit value from a byte array. More...
 
(bool) + fromBytes1WithInput:inputIndex:bitOffset:
 Reads a 1-bit value from a byte array. More...
 
(int) + fromBytes20WithInput:inputIndex:bitOffset:
 Reads an 20-bit value from a byte array. More...
 
(int) + fromBytes21WithInput:inputIndex:bitOffset:
 Reads an 21-bit value from a byte array. More...
 
(int) + fromBytes22WithInput:inputIndex:bitOffset:
 Reads an 22-bit value from a byte array. More...
 
(int) + fromBytes23WithInput:inputIndex:bitOffset:
 Reads an 23-bit value from a byte array. More...
 
(int) + fromBytes24WithInput:inputIndex:littleEndian:
 Reads a 24-bit value from a byte array. More...
 
(int) + fromBytes2WithInput:inputIndex:bitOffset:
 Reads a 2-bit value from a byte array. More...
 
(long long) + fromBytes32WithInput:inputIndex:littleEndian:
 Reads a 32-bit value from a byte array. More...
 
(int) + fromBytes3WithInput:inputIndex:bitOffset:
 Reads a 3-bit value from a byte array. More...
 
(long long) + fromBytes40WithInput:inputIndex:littleEndian:
 Reads a 40-bit value from a byte array. More...
 
(long long) + fromBytes48WithInput:inputIndex:littleEndian:
 Reads a 48-bit value from a byte array. More...
 
(int) + fromBytes4WithInput:inputIndex:bitOffset:
 Reads a 4-bit value from a byte array. More...
 
(long long) + fromBytes56WithInput:inputIndex:littleEndian:
 Reads a 56-bit value from a byte array. More...
 
(int) + fromBytes5WithInput:inputIndex:bitOffset:
 Reads a 5-bit value from a byte array. More...
 
(long long) + fromBytes64WithInput:inputIndex:littleEndian:
 Reads a 64-bit value from a byte array. More...
 
(int) + fromBytes6WithInput:inputIndex:bitOffset:
 Reads a 6-bit value from a byte array. More...
 
(int) + fromBytes7WithInput:inputIndex:bitOffset:
 Reads a 7-bit value from a byte array. More...
 
(int) + fromBytes8WithInput:inputIndex:
 Reads an 8-bit value from a byte array. More...
 
(int) + fromBytes9WithInput:inputIndex:bitOffset:
 Reads a 9-bit value from a byte array. More...
 
(void) + interleaveTransformWithInputFrame:outputFrame:width:height:stride:rotation:
 Interleave and transform (rotate) a byte array containing two planes. More...
 
(void) + interleaveTransformWithInputFrame:outputFrame:width:height:stride:rotation:start:
 Interleave and transform (rotate) a byte array containing two planes. More...
 
(void) + interleaveTransformWithInputFrame:outputFrame:width:height:stride:rotation:start:reversePlanes:
 Interleave and transform (rotate) a byte array containing two planes. More...
 
(void) + interleaveWithInputFrame:outputFrame:
 Interleaves a byte array i.e. More...
 
(void) + interleaveWithInputFrame:outputFrame:start:length:
 Interleaves a byte array i.e. More...
 
(void) + interleaveWithInputFrame:outputFrame:start:length:reversePlanes:
 Interleaves a byte array i.e. More...
 
(NSMutableData *) + toBytes1:bitOffset:
 Converts a 1-bit value to a byte array. More...
 
(NSMutableData *) + toBytes1:bitOffset:output:outputIndex:
 Writes a 1-bit value to a byte array. More...
 
(NSMutableData *) + toBytes10:bitOffset:littleEndian:
 Converts a 10-bit value to a byte array. More...
 
(NSMutableData *) + toBytes10:bitOffset:littleEndian:output:outputIndex:
 Writes a 10-bit value to a byte array. More...
 
(NSMutableData *) + toBytes11:bitOffset:littleEndian:
 Converts a 11-bit value to a byte array. More...
 
(NSMutableData *) + toBytes11:bitOffset:littleEndian:output:outputIndex:
 Writes a 11-bit value to a byte array. More...
 
(NSMutableData *) + toBytes12:bitOffset:littleEndian:
 Converts a 12-bit value to a byte array. More...
 
(NSMutableData *) + toBytes12:bitOffset:littleEndian:output:outputIndex:
 Writes a 12-bit value to a byte array. More...
 
(NSMutableData *) + toBytes13:bitOffset:littleEndian:
 Converts a 13-bit value to a byte array. More...
 
(NSMutableData *) + toBytes13:bitOffset:littleEndian:output:outputIndex:
 Writes a 13-bit value to a byte array. More...
 
(NSMutableData *) + toBytes14:bitOffset:littleEndian:
 Converts a 14-bit value to a byte array. More...
 
(NSMutableData *) + toBytes14:bitOffset:littleEndian:output:outputIndex:
 Writes a 14-bit value to a byte array. More...
 
(NSMutableData *) + toBytes15:bitOffset:littleEndian:
 Converts a 15-bit value to a byte array. More...
 
(NSMutableData *) + toBytes15:bitOffset:littleEndian:output:outputIndex:
 Writes a 15-bit value to a byte array. More...
 
(NSMutableData *) + toBytes16:littleEndian:
 Converts a 16-bit value to a byte array. More...
 
(NSMutableData *) + toBytes16:littleEndian:output:outputIndex:
 Writes a 16-bit value to a byte array. More...
 
(NSMutableData *) + toBytes17:bitOffset:littleEndian:
 Converts a 17-bit value to a byte array. More...
 
(NSMutableData *) + toBytes17:bitOffset:littleEndian:output:outputIndex:
 Writes a 17-bit value to a byte array. More...
 
(NSMutableData *) + toBytes18:bitOffset:littleEndian:
 Converts an 18-bit value to a byte array. More...
 
(NSMutableData *) + toBytes18:bitOffset:littleEndian:output:outputIndex:
 Writes an 18-bit value to a byte array. More...
 
(NSMutableData *) + toBytes19:bitOffset:littleEndian:
 Converts a 19-bit value to a byte array. More...
 
(NSMutableData *) + toBytes19:bitOffset:littleEndian:output:outputIndex:
 Writes a 19-bit value to a byte array. More...
 
(NSMutableData *) + toBytes2:bitOffset:
 Converts a 2-bit value to a byte array. More...
 
(NSMutableData *) + toBytes2:bitOffset:output:outputIndex:
 Writes a 2-bit value to a byte array. More...
 
(NSMutableData *) + toBytes20:bitOffset:littleEndian:
 Converts a 20-bit value to a byte array. More...
 
(NSMutableData *) + toBytes20:bitOffset:littleEndian:output:outputIndex:
 Writes a 20-bit value to a byte array. More...
 
(NSMutableData *) + toBytes21:bitOffset:littleEndian:
 Converts a 21-bit value to a byte array. More...
 
(NSMutableData *) + toBytes21:bitOffset:littleEndian:output:outputIndex:
 Writes a 21-bit value to a byte array. More...
 
(NSMutableData *) + toBytes22:bitOffset:littleEndian:
 Converts a 22-bit value to a byte array. More...
 
(NSMutableData *) + toBytes22:bitOffset:littleEndian:output:outputIndex:
 Writes a 22-bit value to a byte array. More...
 
(NSMutableData *) + toBytes23:bitOffset:littleEndian:
 Converts a 23-bit value to a byte array. More...
 
(NSMutableData *) + toBytes23:bitOffset:littleEndian:output:outputIndex:
 Writes a 23-bit value to a byte array. More...
 
(NSMutableData *) + toBytes24:littleEndian:
 Converts a 24-bit value to a byte array. More...
 
(NSMutableData *) + toBytes24:littleEndian:output:outputIndex:
 Writes a 24-bit value to a byte array. More...
 
(NSMutableData *) + toBytes3:bitOffset:
 Converts a 3-bit value to a byte array. More...
 
(NSMutableData *) + toBytes3:bitOffset:output:outputIndex:
 Writes a 3-bit value to a byte array. More...
 
(NSMutableData *) + toBytes32:littleEndian:
 Converts a 32-bit value to a byte array. More...
 
(NSMutableData *) + toBytes32:littleEndian:output:outputIndex:
 Writes a 32-bit value to a byte array. More...
 
(NSMutableData *) + toBytes4:bitOffset:
 Converts a 4-bit value to a byte array. More...
 
(NSMutableData *) + toBytes4:bitOffset:output:outputIndex:
 Writes a 4-bit value to a byte array. More...
 
(NSMutableData *) + toBytes40:littleEndian:
 Converts a 40-bit value to a byte array. More...
 
(NSMutableData *) + toBytes40:littleEndian:output:outputIndex:
 Writes a 40-bit value to a byte array. More...
 
(NSMutableData *) + toBytes48:littleEndian:
 Converts a 48-bit value to a byte array. More...
 
(NSMutableData *) + toBytes48:littleEndian:output:outputIndex:
 Writes a 48-bit value to a byte array. More...
 
(NSMutableData *) + toBytes5:bitOffset:
 Converts a 5-bit value to a byte array. More...
 
(NSMutableData *) + toBytes5:bitOffset:output:outputIndex:
 Writes a 5-bit value to a byte array. More...
 
(NSMutableData *) + toBytes56:littleEndian:
 Converts a 56-bit value to a byte array. More...
 
(NSMutableData *) + toBytes56:littleEndian:output:outputIndex:
 Writes a 56-bit value to a byte array. More...
 
(NSMutableData *) + toBytes6:bitOffset:
 Converts a 6-bit value to a byte array. More...
 
(NSMutableData *) + toBytes6:bitOffset:output:outputIndex:
 Writes a 6-bit value to a byte array. More...
 
(NSMutableData *) + toBytes64:littleEndian:
 Converts a 64-bit value to a byte array. More...
 
(NSMutableData *) + toBytes64:littleEndian:output:outputIndex:
 Writes a 64-bit value to a byte array. More...
 
(NSMutableData *) + toBytes7:bitOffset:
 Converts a 7-bit value to a byte array. More...
 
(NSMutableData *) + toBytes7:bitOffset:output:outputIndex:
 Writes a 7-bit value to a byte array. More...
 
(NSMutableData *) + toBytes8:
 Converts an 8-bit value to a byte array. More...
 
(NSMutableData *) + toBytes8:output:outputIndex:
 Writes an 8-bit value to a byte array. More...
 
(NSMutableData *) + toBytes9:bitOffset:littleEndian:
 Converts a 9-bit value to a byte array. More...
 
(NSMutableData *) + toBytes9:bitOffset:littleEndian:output:outputIndex:
 Writes a 9-bit value to a byte array. More...
 
(void) + transformWithInputFrame:outputFrame:width:height:stride:rotation:
 Transforms a byte containing a 2D plane (rotates 90, 180, 270) More...
 
(void) + transformWithInputFrame:outputFrame:width:height:stride:rotation:inputStart:outputStart:
 Transforms a byte containing a 2D plane (rotates 90, 180, 270) More...
 
(void) + transformWithInputFrame:outputFrame:width:height:stride:rotation:inputStart:outputStart:chunkLength:
 Transforms a byte containing a 2D plane (rotates 90, 180, 270). More...
 
(void) + transformWithInputFrame:outputFrame:width:height:stride:rotation:start:
 Transforms a byte containing a 2D plane (rotates 90, 180, 270) More...
 
(bool) + tryFromBytes10WithInput:inputIndex:bitOffset:value:
 Tries to read a 10-bit value from a byte array. More...
 
(bool) + tryFromBytes11WithInput:inputIndex:bitOffset:value:
 Tries to read a 11-bit value from a byte array. More...
 
(bool) + tryFromBytes12WithInput:inputIndex:bitOffset:value:
 Tries to read a 12-bit value from a byte array. More...
 
(bool) + tryFromBytes13WithInput:inputIndex:bitOffset:value:
 Tries to read a 13-bit value from a byte array. More...
 
(bool) + tryFromBytes14WithInput:inputIndex:bitOffset:value:
 Tries to read a 14-bit value from a byte array. More...
 
(bool) + tryFromBytes15WithInput:inputIndex:bitOffset:value:
 Tries to read a 15-bit value from a byte array. More...
 
(bool) + tryFromBytes16WithInput:inputIndex:littleEndian:value:
 Tries to read a 16-bit value from a byte array. More...
 
(bool) + tryFromBytes17WithInput:inputIndex:bitOffset:value:
 Tries to read a 17-bit value from a byte array. More...
 
(bool) + tryFromBytes18WithInput:inputIndex:bitOffset:value:
 Tries to read a 18-bit value from a byte array. More...
 
(bool) + tryFromBytes19WithInput:inputIndex:bitOffset:value:
 Tries to read a 19-bit value from a byte array. More...
 
(bool) + tryFromBytes1WithInput:inputIndex:bitOffset:value:
 Tries to read a 1-bit value from a byte array. More...
 
(bool) + tryFromBytes20WithInput:inputIndex:bitOffset:value:
 Tries to read a 20-bit value from a byte array. More...
 
(bool) + tryFromBytes21WithInput:inputIndex:bitOffset:value:
 Tries to read a 21-bit value from a byte array. More...
 
(bool) + tryFromBytes22WithInput:inputIndex:bitOffset:value:
 Tries to read a 22-bit value from a byte array. More...
 
(bool) + tryFromBytes23WithInput:inputIndex:bitOffset:value:
 Tries to read a 23-bit value from a byte array. More...
 
(bool) + tryFromBytes24WithInput:inputIndex:littleEndian:value:
 Tries to read a 24-bit value from a byte array. More...
 
(bool) + tryFromBytes2WithInput:inputIndex:bitOffset:value:
 Tries to read a 2-bit value from a byte array. More...
 
(bool) + tryFromBytes32WithInput:inputIndex:littleEndian:value:
 Tries to read a 32-bit value from a byte array. More...
 
(bool) + tryFromBytes3WithInput:inputIndex:bitOffset:value:
 Tries to read a 3-bit value from a byte array. More...
 
(bool) + tryFromBytes40WithInput:inputIndex:littleEndian:value:
 Tries to read a 40-bit value from a byte array. More...
 
(bool) + tryFromBytes48WithInput:inputIndex:littleEndian:value:
 Tries to read a 48-bit value from a byte array. More...
 
(bool) + tryFromBytes4WithInput:inputIndex:bitOffset:value:
 Tries to read a 4-bit value from a byte array. More...
 
(bool) + tryFromBytes56WithInput:inputIndex:littleEndian:value:
 Tries to read a 56-bit value from a byte array. More...
 
(bool) + tryFromBytes5WithInput:inputIndex:bitOffset:value:
 Tries to read a 5-bit value from a byte array. More...
 
(bool) + tryFromBytes64WithInput:inputIndex:littleEndian:value:
 Tries to read a 64-bit value from a byte array. More...
 
(bool) + tryFromBytes6WithInput:inputIndex:bitOffset:value:
 Tries to read a 6-bit value from a byte array. More...
 
(bool) + tryFromBytes7WithInput:inputIndex:bitOffset:value:
 Tries to read a 7-bit value from a byte array. More...
 
(bool) + tryFromBytes8WithInput:inputIndex:value:
 Tries to read an 8-bit value from a byte array. More...
 
(bool) + tryFromBytes9WithInput:inputIndex:bitOffset:value:
 Tries to read a 9-bit value from a byte array. More...
 

Detailed Description

Common binary methods.

Method Documentation

◆ binary

+ (FMLiveSwitchBinary*) binary

◆ bitStringToBytesWithBitString:

+ (NSMutableData*) bitStringToBytesWithBitString: (NSString *)  bitString

Converts a bit-string to bytes.

Parameters
bitStringThe bit-string.

◆ bitStringToBytesWithBitString:numberOfUnusedBits:

+ (NSMutableData*) bitStringToBytesWithBitString: (NSString *)  bitString
numberOfUnusedBits: (int *)  numberOfUnusedBits 

Converts a bit-string to bytes.

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

◆ bitStringToBytesWithBitString:padLeft:

+ (NSMutableData*) bitStringToBytesWithBitString: (NSString *)  bitString
padLeft: (bool)  padLeft 

Converts a bit-string to bytes.

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

◆ bitStringToBytesWithBitString:padLeft:numberOfUnusedBits:

+ (NSMutableData*) bitStringToBytesWithBitString: (NSString *)  bitString
padLeft: (bool)  padLeft
numberOfUnusedBits: (int *)  numberOfUnusedBits 

Converts a bit-string to bytes.

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

◆ bytesToBitStringWithBytes:

+ (NSString*) bytesToBitStringWithBytes: (NSMutableData *)  bytes

Converts bytes to a bit-string.

Parameters
bytesThe bytes.

◆ bytesToBitStringWithBytes:offset:length:

+ (NSString*) bytesToBitStringWithBytes: (NSMutableData *)  bytes
offset: (int)  offset
length: (int)  length 

Converts bytes to a bit-string.

Parameters
bytesThe bytes.
offsetThe offset.
lengthThe length.

◆ bytesToBitStringWithBytes:offset:length:numberOfUnusedBits:

+ (NSString*) bytesToBitStringWithBytes: (NSMutableData *)  bytes
offset: (int)  offset
length: (int)  length
numberOfUnusedBits: (int)  numberOfUnusedBits 

Converts bytes to a bit-string.

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

◆ bytesToBitStringWithBytes:offset:length:numberOfUnusedBits:trimLeft:

+ (NSString*) bytesToBitStringWithBytes: (NSMutableData *)  bytes
offset: (int)  offset
length: (int)  length
numberOfUnusedBits: (int)  numberOfUnusedBits
trimLeft: (bool)  trimLeft 

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.

◆ deinterleaveTransformWithInputFrame:outputFrame:width:height:stride:rotation:

+ (void) deinterleaveTransformWithInputFrame: (NSMutableData *)  inputFrame
outputFrame: (NSMutableData *)  outputFrame
width: (int)  width
height: (int)  height
stride: (int)  stride
rotation: (int)  rotation 

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.

◆ deinterleaveTransformWithInputFrame:outputFrame:width:height:stride:rotation:start:

+ (void) deinterleaveTransformWithInputFrame: (NSMutableData *)  inputFrame
outputFrame: (NSMutableData *)  outputFrame
width: (int)  width
height: (int)  height
stride: (int)  stride
rotation: (int)  rotation
start: (int)  start 

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.

◆ deinterleaveTransformWithInputFrame:outputFrame:width:height:stride:rotation:start:reversePlanes:

+ (void) deinterleaveTransformWithInputFrame: (NSMutableData *)  inputFrame
outputFrame: (NSMutableData *)  outputFrame
width: (int)  width
height: (int)  height
stride: (int)  stride
rotation: (int)  rotation
start: (int)  start
reversePlanes: (bool)  reversePlanes 

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.

◆ deinterleaveWithInputFrame:outputFrame:

+ (void) deinterleaveWithInputFrame: (NSMutableData *)  inputFrame
outputFrame: (NSMutableData *)  outputFrame 

Deinterleaves a byte array i.e.

XYXYXYXY to XXXXYYYY

Parameters
inputFrameThe inputFrame.
outputFrameThe outputFrame.

◆ deinterleaveWithInputFrame:outputFrame:start:length:

+ (void) deinterleaveWithInputFrame: (NSMutableData *)  inputFrame
outputFrame: (NSMutableData *)  outputFrame
start: (int)  start
length: (int)  length 

Deinterleaves a byte array i.e.

XYXYXYXY to XXXXYYYY

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

◆ deinterleaveWithInputFrame:outputFrame:start:length:reversePlanes:

+ (void) deinterleaveWithInputFrame: (NSMutableData *)  inputFrame
outputFrame: (NSMutableData *)  outputFrame
start: (int)  start
length: (int)  length
reversePlanes: (bool)  reversePlanes 

Deinterleaves a byte array.

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

◆ fromBytes10WithInput:inputIndex:bitOffset:

+ (int) fromBytes10WithInput: (NSMutableData *)  input
inputIndex: (int)  inputIndex
bitOffset: (int)  bitOffset 

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.

◆ fromBytes11WithInput:inputIndex:bitOffset:

+ (int) fromBytes11WithInput: (NSMutableData *)  input
inputIndex: (int)  inputIndex
bitOffset: (int)  bitOffset 

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.

◆ fromBytes12WithInput:inputIndex:bitOffset:

+ (int) fromBytes12WithInput: (NSMutableData *)  input
inputIndex: (int)  inputIndex
bitOffset: (int)  bitOffset 

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.

◆ fromBytes13WithInput:inputIndex:bitOffset:

+ (int) fromBytes13WithInput: (NSMutableData *)  input
inputIndex: (int)  inputIndex
bitOffset: (int)  bitOffset 

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.

◆ fromBytes14WithInput:inputIndex:bitOffset:

+ (int) fromBytes14WithInput: (NSMutableData *)  input
inputIndex: (int)  inputIndex
bitOffset: (int)  bitOffset 

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.

◆ fromBytes15WithInput:inputIndex:bitOffset:

+ (int) fromBytes15WithInput: (NSMutableData *)  input
inputIndex: (int)  inputIndex
bitOffset: (int)  bitOffset 

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.

◆ fromBytes16WithInput:inputIndex:littleEndian:

+ (int) fromBytes16WithInput: (NSMutableData *)  input
inputIndex: (int)  inputIndex
littleEndian: (bool)  littleEndian 

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.

◆ fromBytes17WithInput:inputIndex:bitOffset:

+ (int) fromBytes17WithInput: (NSMutableData *)  input
inputIndex: (int)  inputIndex
bitOffset: (int)  bitOffset 

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.

◆ fromBytes18WithInput:inputIndex:bitOffset:

+ (int) fromBytes18WithInput: (NSMutableData *)  input
inputIndex: (int)  inputIndex
bitOffset: (int)  bitOffset 

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.

◆ fromBytes19WithInput:inputIndex:bitOffset:

+ (int) fromBytes19WithInput: (NSMutableData *)  input
inputIndex: (int)  inputIndex
bitOffset: (int)  bitOffset 

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.

◆ fromBytes1WithInput:inputIndex:bitOffset:

+ (bool) fromBytes1WithInput: (NSMutableData *)  input
inputIndex: (int)  inputIndex
bitOffset: (int)  bitOffset 

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.

◆ fromBytes20WithInput:inputIndex:bitOffset:

+ (int) fromBytes20WithInput: (NSMutableData *)  input
inputIndex: (int)  inputIndex
bitOffset: (int)  bitOffset 

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.

◆ fromBytes21WithInput:inputIndex:bitOffset:

+ (int) fromBytes21WithInput: (NSMutableData *)  input
inputIndex: (int)  inputIndex
bitOffset: (int)  bitOffset 

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.

◆ fromBytes22WithInput:inputIndex:bitOffset:

+ (int) fromBytes22WithInput: (NSMutableData *)  input
inputIndex: (int)  inputIndex
bitOffset: (int)  bitOffset 

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.

◆ fromBytes23WithInput:inputIndex:bitOffset:

+ (int) fromBytes23WithInput: (NSMutableData *)  input
inputIndex: (int)  inputIndex
bitOffset: (int)  bitOffset 

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.

◆ fromBytes24WithInput:inputIndex:littleEndian:

+ (int) fromBytes24WithInput: (NSMutableData *)  input
inputIndex: (int)  inputIndex
littleEndian: (bool)  littleEndian 

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.

◆ fromBytes2WithInput:inputIndex:bitOffset:

+ (int) fromBytes2WithInput: (NSMutableData *)  input
inputIndex: (int)  inputIndex
bitOffset: (int)  bitOffset 

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.

◆ fromBytes32WithInput:inputIndex:littleEndian:

+ (long long) fromBytes32WithInput: (NSMutableData *)  input
inputIndex: (int)  inputIndex
littleEndian: (bool)  littleEndian 

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.

◆ fromBytes3WithInput:inputIndex:bitOffset:

+ (int) fromBytes3WithInput: (NSMutableData *)  input
inputIndex: (int)  inputIndex
bitOffset: (int)  bitOffset 

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.

◆ fromBytes40WithInput:inputIndex:littleEndian:

+ (long long) fromBytes40WithInput: (NSMutableData *)  input
inputIndex: (int)  inputIndex
littleEndian: (bool)  littleEndian 

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.

◆ fromBytes48WithInput:inputIndex:littleEndian:

+ (long long) fromBytes48WithInput: (NSMutableData *)  input
inputIndex: (int)  inputIndex
littleEndian: (bool)  littleEndian 

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.

◆ fromBytes4WithInput:inputIndex:bitOffset:

+ (int) fromBytes4WithInput: (NSMutableData *)  input
inputIndex: (int)  inputIndex
bitOffset: (int)  bitOffset 

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.

◆ fromBytes56WithInput:inputIndex:littleEndian:

+ (long long) fromBytes56WithInput: (NSMutableData *)  input
inputIndex: (int)  inputIndex
littleEndian: (bool)  littleEndian 

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.

◆ fromBytes5WithInput:inputIndex:bitOffset:

+ (int) fromBytes5WithInput: (NSMutableData *)  input
inputIndex: (int)  inputIndex
bitOffset: (int)  bitOffset 

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.

◆ fromBytes64WithInput:inputIndex:littleEndian:

+ (long long) fromBytes64WithInput: (NSMutableData *)  input
inputIndex: (int)  inputIndex
littleEndian: (bool)  littleEndian 

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.

◆ fromBytes6WithInput:inputIndex:bitOffset:

+ (int) fromBytes6WithInput: (NSMutableData *)  input
inputIndex: (int)  inputIndex
bitOffset: (int)  bitOffset 

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.

◆ fromBytes7WithInput:inputIndex:bitOffset:

+ (int) fromBytes7WithInput: (NSMutableData *)  input
inputIndex: (int)  inputIndex
bitOffset: (int)  bitOffset 

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.

◆ fromBytes8WithInput:inputIndex:

+ (int) fromBytes8WithInput: (NSMutableData *)  input
inputIndex: (int)  inputIndex 

Reads an 8-bit value from a byte array.

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

◆ fromBytes9WithInput:inputIndex:bitOffset:

+ (int) fromBytes9WithInput: (NSMutableData *)  input
inputIndex: (int)  inputIndex
bitOffset: (int)  bitOffset 

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.

◆ init

- (instancetype) init

◆ interleaveTransformWithInputFrame:outputFrame:width:height:stride:rotation:

+ (void) interleaveTransformWithInputFrame: (NSMutableData *)  inputFrame
outputFrame: (NSMutableData *)  outputFrame
width: (int)  width
height: (int)  height
stride: (int)  stride
rotation: (int)  rotation 

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.

◆ interleaveTransformWithInputFrame:outputFrame:width:height:stride:rotation:start:

+ (void) interleaveTransformWithInputFrame: (NSMutableData *)  inputFrame
outputFrame: (NSMutableData *)  outputFrame
width: (int)  width
height: (int)  height
stride: (int)  stride
rotation: (int)  rotation
start: (int)  start 

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.

◆ interleaveTransformWithInputFrame:outputFrame:width:height:stride:rotation:start:reversePlanes:

+ (void) interleaveTransformWithInputFrame: (NSMutableData *)  inputFrame
outputFrame: (NSMutableData *)  outputFrame
width: (int)  width
height: (int)  height
stride: (int)  stride
rotation: (int)  rotation
start: (int)  start
reversePlanes: (bool)  reversePlanes 

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.

◆ interleaveWithInputFrame:outputFrame:

+ (void) interleaveWithInputFrame: (NSMutableData *)  inputFrame
outputFrame: (NSMutableData *)  outputFrame 

Interleaves a byte array i.e.

XXXXYYYY to XYXYXYXY

Parameters
inputFrameThe inputFrame.
outputFrameThe outputFrame.

◆ interleaveWithInputFrame:outputFrame:start:length:

+ (void) interleaveWithInputFrame: (NSMutableData *)  inputFrame
outputFrame: (NSMutableData *)  outputFrame
start: (int)  start
length: (int)  length 

Interleaves a byte array i.e.

XXXXYYYY to XYXYXYXY

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

◆ interleaveWithInputFrame:outputFrame:start:length:reversePlanes:

+ (void) interleaveWithInputFrame: (NSMutableData *)  inputFrame
outputFrame: (NSMutableData *)  outputFrame
start: (int)  start
length: (int)  length
reversePlanes: (bool)  reversePlanes 

Interleaves a byte array i.e.

XXXXYYYY to XYXYXYXY

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

◆ toBytes10:bitOffset:littleEndian:

+ (NSMutableData*) toBytes10: (int)  value
bitOffset: (int)  bitOffset
littleEndian: (bool)  littleEndian 

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:bitOffset:littleEndian:output:outputIndex:

+ (NSMutableData*) toBytes10: (int)  value
bitOffset: (int)  bitOffset
littleEndian: (bool)  littleEndian
output: (NSMutableData *)  output
outputIndex: (int)  outputIndex 

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:bitOffset:littleEndian:

+ (NSMutableData*) toBytes11: (int)  value
bitOffset: (int)  bitOffset
littleEndian: (bool)  littleEndian 

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:bitOffset:littleEndian:output:outputIndex:

+ (NSMutableData*) toBytes11: (int)  value
bitOffset: (int)  bitOffset
littleEndian: (bool)  littleEndian
output: (NSMutableData *)  output
outputIndex: (int)  outputIndex 

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:bitOffset:littleEndian:

+ (NSMutableData*) toBytes12: (int)  value
bitOffset: (int)  bitOffset
littleEndian: (bool)  littleEndian 

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:bitOffset:littleEndian:output:outputIndex:

+ (NSMutableData*) toBytes12: (int)  value
bitOffset: (int)  bitOffset
littleEndian: (bool)  littleEndian
output: (NSMutableData *)  output
outputIndex: (int)  outputIndex 

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:bitOffset:littleEndian:

+ (NSMutableData*) toBytes13: (int)  value
bitOffset: (int)  bitOffset
littleEndian: (bool)  littleEndian 

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:bitOffset:littleEndian:output:outputIndex:

+ (NSMutableData*) toBytes13: (int)  value
bitOffset: (int)  bitOffset
littleEndian: (bool)  littleEndian
output: (NSMutableData *)  output
outputIndex: (int)  outputIndex 

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:bitOffset:littleEndian:

+ (NSMutableData*) toBytes14: (int)  value
bitOffset: (int)  bitOffset
littleEndian: (bool)  littleEndian 

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:bitOffset:littleEndian:output:outputIndex:

+ (NSMutableData*) toBytes14: (int)  value
bitOffset: (int)  bitOffset
littleEndian: (bool)  littleEndian
output: (NSMutableData *)  output
outputIndex: (int)  outputIndex 

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:bitOffset:littleEndian:

+ (NSMutableData*) toBytes15: (int)  value
bitOffset: (int)  bitOffset
littleEndian: (bool)  littleEndian 

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:bitOffset:littleEndian:output:outputIndex:

+ (NSMutableData*) toBytes15: (int)  value
bitOffset: (int)  bitOffset
littleEndian: (bool)  littleEndian
output: (NSMutableData *)  output
outputIndex: (int)  outputIndex 

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:littleEndian:

+ (NSMutableData*) toBytes16: (int)  value
littleEndian: (bool)  littleEndian 

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:littleEndian:output:outputIndex:

+ (NSMutableData*) toBytes16: (int)  value
littleEndian: (bool)  littleEndian
output: (NSMutableData *)  output
outputIndex: (int)  outputIndex 

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:bitOffset:littleEndian:

+ (NSMutableData*) toBytes17: (int)  value
bitOffset: (int)  bitOffset
littleEndian: (bool)  littleEndian 

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:bitOffset:littleEndian:output:outputIndex:

+ (NSMutableData*) toBytes17: (int)  value
bitOffset: (int)  bitOffset
littleEndian: (bool)  littleEndian
output: (NSMutableData *)  output
outputIndex: (int)  outputIndex 

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:bitOffset:littleEndian:

+ (NSMutableData*) toBytes18: (int)  value
bitOffset: (int)  bitOffset
littleEndian: (bool)  littleEndian 

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:bitOffset:littleEndian:output:outputIndex:

+ (NSMutableData*) toBytes18: (int)  value
bitOffset: (int)  bitOffset
littleEndian: (bool)  littleEndian
output: (NSMutableData *)  output
outputIndex: (int)  outputIndex 

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:bitOffset:littleEndian:

+ (NSMutableData*) toBytes19: (int)  value
bitOffset: (int)  bitOffset
littleEndian: (bool)  littleEndian 

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:bitOffset:littleEndian:output:outputIndex:

+ (NSMutableData*) toBytes19: (int)  value
bitOffset: (int)  bitOffset
littleEndian: (bool)  littleEndian
output: (NSMutableData *)  output
outputIndex: (int)  outputIndex 

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.

◆ toBytes1:bitOffset:

+ (NSMutableData*) toBytes1: (bool)  value
bitOffset: (int)  bitOffset 

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:bitOffset:output:outputIndex:

+ (NSMutableData*) toBytes1: (bool)  value
bitOffset: (int)  bitOffset
output: (NSMutableData *)  output
outputIndex: (int)  outputIndex 

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.

◆ toBytes20:bitOffset:littleEndian:

+ (NSMutableData*) toBytes20: (int)  value
bitOffset: (int)  bitOffset
littleEndian: (bool)  littleEndian 

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:bitOffset:littleEndian:output:outputIndex:

+ (NSMutableData*) toBytes20: (int)  value
bitOffset: (int)  bitOffset
littleEndian: (bool)  littleEndian
output: (NSMutableData *)  output
outputIndex: (int)  outputIndex 

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:bitOffset:littleEndian:

+ (NSMutableData*) toBytes21: (int)  value
bitOffset: (int)  bitOffset
littleEndian: (bool)  littleEndian 

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:bitOffset:littleEndian:output:outputIndex:

+ (NSMutableData*) toBytes21: (int)  value
bitOffset: (int)  bitOffset
littleEndian: (bool)  littleEndian
output: (NSMutableData *)  output
outputIndex: (int)  outputIndex 

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:bitOffset:littleEndian:

+ (NSMutableData*) toBytes22: (int)  value
bitOffset: (int)  bitOffset
littleEndian: (bool)  littleEndian 

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:bitOffset:littleEndian:output:outputIndex:

+ (NSMutableData*) toBytes22: (int)  value
bitOffset: (int)  bitOffset
littleEndian: (bool)  littleEndian
output: (NSMutableData *)  output
outputIndex: (int)  outputIndex 

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:bitOffset:littleEndian:

+ (NSMutableData*) toBytes23: (int)  value
bitOffset: (int)  bitOffset
littleEndian: (bool)  littleEndian 

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:bitOffset:littleEndian:output:outputIndex:

+ (NSMutableData*) toBytes23: (int)  value
bitOffset: (int)  bitOffset
littleEndian: (bool)  littleEndian
output: (NSMutableData *)  output
outputIndex: (int)  outputIndex 

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:littleEndian:

+ (NSMutableData*) toBytes24: (int)  value
littleEndian: (bool)  littleEndian 

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:littleEndian:output:outputIndex:

+ (NSMutableData*) toBytes24: (int)  value
littleEndian: (bool)  littleEndian
output: (NSMutableData *)  output
outputIndex: (int)  outputIndex 

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.

◆ toBytes2:bitOffset:

+ (NSMutableData*) toBytes2: (int)  value
bitOffset: (int)  bitOffset 

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:bitOffset:output:outputIndex:

+ (NSMutableData*) toBytes2: (int)  value
bitOffset: (int)  bitOffset
output: (NSMutableData *)  output
outputIndex: (int)  outputIndex 

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.

◆ toBytes32:littleEndian:

+ (NSMutableData*) toBytes32: (long long)  value
littleEndian: (bool)  littleEndian 

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:littleEndian:output:outputIndex:

+ (NSMutableData*) toBytes32: (long long)  value
littleEndian: (bool)  littleEndian
output: (NSMutableData *)  output
outputIndex: (int)  outputIndex 

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.

◆ toBytes3:bitOffset:

+ (NSMutableData*) toBytes3: (int)  value
bitOffset: (int)  bitOffset 

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:bitOffset:output:outputIndex:

+ (NSMutableData*) toBytes3: (int)  value
bitOffset: (int)  bitOffset
output: (NSMutableData *)  output
outputIndex: (int)  outputIndex 

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.

◆ toBytes40:littleEndian:

+ (NSMutableData*) toBytes40: (long long)  value
littleEndian: (bool)  littleEndian 

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:littleEndian:output:outputIndex:

+ (NSMutableData*) toBytes40: (long long)  value
littleEndian: (bool)  littleEndian
output: (NSMutableData *)  output
outputIndex: (int)  outputIndex 

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:littleEndian:

+ (NSMutableData*) toBytes48: (long long)  value
littleEndian: (bool)  littleEndian 

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:littleEndian:output:outputIndex:

+ (NSMutableData*) toBytes48: (long long)  value
littleEndian: (bool)  littleEndian
output: (NSMutableData *)  output
outputIndex: (int)  outputIndex 

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.

◆ toBytes4:bitOffset:

+ (NSMutableData*) toBytes4: (int)  value
bitOffset: (int)  bitOffset 

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:bitOffset:output:outputIndex:

+ (NSMutableData*) toBytes4: (int)  value
bitOffset: (int)  bitOffset
output: (NSMutableData *)  output
outputIndex: (int)  outputIndex 

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.

◆ toBytes56:littleEndian:

+ (NSMutableData*) toBytes56: (long long)  value
littleEndian: (bool)  littleEndian 

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:littleEndian:output:outputIndex:

+ (NSMutableData*) toBytes56: (long long)  value
littleEndian: (bool)  littleEndian
output: (NSMutableData *)  output
outputIndex: (int)  outputIndex 

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.

◆ toBytes5:bitOffset:

+ (NSMutableData*) toBytes5: (int)  value
bitOffset: (int)  bitOffset 

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:bitOffset:output:outputIndex:

+ (NSMutableData*) toBytes5: (int)  value
bitOffset: (int)  bitOffset
output: (NSMutableData *)  output
outputIndex: (int)  outputIndex 

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.

◆ toBytes64:littleEndian:

+ (NSMutableData*) toBytes64: (long long)  value
littleEndian: (bool)  littleEndian 

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:littleEndian:output:outputIndex:

+ (NSMutableData*) toBytes64: (long long)  value
littleEndian: (bool)  littleEndian
output: (NSMutableData *)  output
outputIndex: (int)  outputIndex 

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.

◆ toBytes6:bitOffset:

+ (NSMutableData*) toBytes6: (int)  value
bitOffset: (int)  bitOffset 

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:bitOffset:output:outputIndex:

+ (NSMutableData*) toBytes6: (int)  value
bitOffset: (int)  bitOffset
output: (NSMutableData *)  output
outputIndex: (int)  outputIndex 

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.

◆ toBytes7:bitOffset:

+ (NSMutableData*) toBytes7: (int)  value
bitOffset: (int)  bitOffset 

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:bitOffset:output:outputIndex:

+ (NSMutableData*) toBytes7: (int)  value
bitOffset: (int)  bitOffset
output: (NSMutableData *)  output
outputIndex: (int)  outputIndex 

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:

+ (NSMutableData*) toBytes8: (int)  value

Converts an 8-bit value to a byte array.

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

◆ toBytes8:output:outputIndex:

+ (NSMutableData*) toBytes8: (int)  value
output: (NSMutableData *)  output
outputIndex: (int)  outputIndex 

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:bitOffset:littleEndian:

+ (NSMutableData*) toBytes9: (int)  value
bitOffset: (int)  bitOffset
littleEndian: (bool)  littleEndian 

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:bitOffset:littleEndian:output:outputIndex:

+ (NSMutableData*) toBytes9: (int)  value
bitOffset: (int)  bitOffset
littleEndian: (bool)  littleEndian
output: (NSMutableData *)  output
outputIndex: (int)  outputIndex 

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.

◆ transformWithInputFrame:outputFrame:width:height:stride:rotation:

+ (void) transformWithInputFrame: (NSMutableData *)  inputFrame
outputFrame: (NSMutableData *)  outputFrame
width: (int)  width
height: (int)  height
stride: (int)  stride
rotation: (int)  rotation 

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

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

◆ transformWithInputFrame:outputFrame:width:height:stride:rotation:inputStart:outputStart:

+ (void) transformWithInputFrame: (NSMutableData *)  inputFrame
outputFrame: (NSMutableData *)  outputFrame
width: (int)  width
height: (int)  height
stride: (int)  stride
rotation: (int)  rotation
inputStart: (int)  inputStart
outputStart: (int)  outputStart 

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.

◆ transformWithInputFrame:outputFrame:width:height:stride:rotation:inputStart:outputStart:chunkLength:

+ (void) transformWithInputFrame: (NSMutableData *)  inputFrame
outputFrame: (NSMutableData *)  outputFrame
width: (int)  width
height: (int)  height
stride: (int)  stride
rotation: (int)  rotation
inputStart: (int)  inputStart
outputStart: (int)  outputStart
chunkLength: (int)  chunkLength 

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.

◆ transformWithInputFrame:outputFrame:width:height:stride:rotation:start:

+ (void) transformWithInputFrame: (NSMutableData *)  inputFrame
outputFrame: (NSMutableData *)  outputFrame
width: (int)  width
height: (int)  height
stride: (int)  stride
rotation: (int)  rotation
start: (int)  start 

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

◆ tryFromBytes10WithInput:inputIndex:bitOffset:value:

+ (bool) tryFromBytes10WithInput: (NSMutableData *)  input
inputIndex: (int)  inputIndex
bitOffset: (int)  bitOffset
value: (int *)  value 

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

◆ tryFromBytes11WithInput:inputIndex:bitOffset:value:

+ (bool) tryFromBytes11WithInput: (NSMutableData *)  input
inputIndex: (int)  inputIndex
bitOffset: (int)  bitOffset
value: (int *)  value 

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

◆ tryFromBytes12WithInput:inputIndex:bitOffset:value:

+ (bool) tryFromBytes12WithInput: (NSMutableData *)  input
inputIndex: (int)  inputIndex
bitOffset: (int)  bitOffset
value: (int *)  value 

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

◆ tryFromBytes13WithInput:inputIndex:bitOffset:value:

+ (bool) tryFromBytes13WithInput: (NSMutableData *)  input
inputIndex: (int)  inputIndex
bitOffset: (int)  bitOffset
value: (int *)  value 

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

◆ tryFromBytes14WithInput:inputIndex:bitOffset:value:

+ (bool) tryFromBytes14WithInput: (NSMutableData *)  input
inputIndex: (int)  inputIndex
bitOffset: (int)  bitOffset
value: (int *)  value 

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

◆ tryFromBytes15WithInput:inputIndex:bitOffset:value:

+ (bool) tryFromBytes15WithInput: (NSMutableData *)  input
inputIndex: (int)  inputIndex
bitOffset: (int)  bitOffset
value: (int *)  value 

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

◆ tryFromBytes16WithInput:inputIndex:littleEndian:value:

+ (bool) tryFromBytes16WithInput: (NSMutableData *)  input
inputIndex: (int)  inputIndex
littleEndian: (bool)  littleEndian
value: (int *)  value 

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

◆ tryFromBytes17WithInput:inputIndex:bitOffset:value:

+ (bool) tryFromBytes17WithInput: (NSMutableData *)  input
inputIndex: (int)  inputIndex
bitOffset: (int)  bitOffset
value: (int *)  value 

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

◆ tryFromBytes18WithInput:inputIndex:bitOffset:value:

+ (bool) tryFromBytes18WithInput: (NSMutableData *)  input
inputIndex: (int)  inputIndex
bitOffset: (int)  bitOffset
value: (int *)  value 

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

◆ tryFromBytes19WithInput:inputIndex:bitOffset:value:

+ (bool) tryFromBytes19WithInput: (NSMutableData *)  input
inputIndex: (int)  inputIndex
bitOffset: (int)  bitOffset
value: (int *)  value 

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

◆ tryFromBytes1WithInput:inputIndex:bitOffset:value:

+ (bool) tryFromBytes1WithInput: (NSMutableData *)  input
inputIndex: (int)  inputIndex
bitOffset: (int)  bitOffset
value: (bool *)  value 

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

◆ tryFromBytes20WithInput:inputIndex:bitOffset:value:

+ (bool) tryFromBytes20WithInput: (NSMutableData *)  input
inputIndex: (int)  inputIndex
bitOffset: (int)  bitOffset
value: (int *)  value 

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

◆ tryFromBytes21WithInput:inputIndex:bitOffset:value:

+ (bool) tryFromBytes21WithInput: (NSMutableData *)  input
inputIndex: (int)  inputIndex
bitOffset: (int)  bitOffset
value: (int *)  value 

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

◆ tryFromBytes22WithInput:inputIndex:bitOffset:value:

+ (bool) tryFromBytes22WithInput: (NSMutableData *)  input
inputIndex: (int)  inputIndex
bitOffset: (int)  bitOffset
value: (int *)  value 

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

◆ tryFromBytes23WithInput:inputIndex:bitOffset:value:

+ (bool) tryFromBytes23WithInput: (NSMutableData *)  input
inputIndex: (int)  inputIndex
bitOffset: (int)  bitOffset
value: (int *)  value 

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

◆ tryFromBytes24WithInput:inputIndex:littleEndian:value:

+ (bool) tryFromBytes24WithInput: (NSMutableData *)  input
inputIndex: (int)  inputIndex
littleEndian: (bool)  littleEndian
value: (int *)  value 

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

◆ tryFromBytes2WithInput:inputIndex:bitOffset:value:

+ (bool) tryFromBytes2WithInput: (NSMutableData *)  input
inputIndex: (int)  inputIndex
bitOffset: (int)  bitOffset
value: (int *)  value 

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

◆ tryFromBytes32WithInput:inputIndex:littleEndian:value:

+ (bool) tryFromBytes32WithInput: (NSMutableData *)  input
inputIndex: (int)  inputIndex
littleEndian: (bool)  littleEndian
value: (long long *)  value 

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

◆ tryFromBytes3WithInput:inputIndex:bitOffset:value:

+ (bool) tryFromBytes3WithInput: (NSMutableData *)  input
inputIndex: (int)  inputIndex
bitOffset: (int)  bitOffset
value: (int *)  value 

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

◆ tryFromBytes40WithInput:inputIndex:littleEndian:value:

+ (bool) tryFromBytes40WithInput: (NSMutableData *)  input
inputIndex: (int)  inputIndex
littleEndian: (bool)  littleEndian
value: (long long *)  value 

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

◆ tryFromBytes48WithInput:inputIndex:littleEndian:value:

+ (bool) tryFromBytes48WithInput: (NSMutableData *)  input
inputIndex: (int)  inputIndex
littleEndian: (bool)  littleEndian
value: (long long *)  value 

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

◆ tryFromBytes4WithInput:inputIndex:bitOffset:value:

+ (bool) tryFromBytes4WithInput: (NSMutableData *)  input
inputIndex: (int)  inputIndex
bitOffset: (int)  bitOffset
value: (int *)  value 

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

◆ tryFromBytes56WithInput:inputIndex:littleEndian:value:

+ (bool) tryFromBytes56WithInput: (NSMutableData *)  input
inputIndex: (int)  inputIndex
littleEndian: (bool)  littleEndian
value: (long long *)  value 

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

◆ tryFromBytes5WithInput:inputIndex:bitOffset:value:

+ (bool) tryFromBytes5WithInput: (NSMutableData *)  input
inputIndex: (int)  inputIndex
bitOffset: (int)  bitOffset
value: (int *)  value 

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

◆ tryFromBytes64WithInput:inputIndex:littleEndian:value:

+ (bool) tryFromBytes64WithInput: (NSMutableData *)  input
inputIndex: (int)  inputIndex
littleEndian: (bool)  littleEndian
value: (long long *)  value 

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

◆ tryFromBytes6WithInput:inputIndex:bitOffset:value:

+ (bool) tryFromBytes6WithInput: (NSMutableData *)  input
inputIndex: (int)  inputIndex
bitOffset: (int)  bitOffset
value: (int *)  value 

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

◆ tryFromBytes7WithInput:inputIndex:bitOffset:value:

+ (bool) tryFromBytes7WithInput: (NSMutableData *)  input
inputIndex: (int)  inputIndex
bitOffset: (int)  bitOffset
value: (int *)  value 

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

◆ tryFromBytes8WithInput:inputIndex:value:

+ (bool) tryFromBytes8WithInput: (NSMutableData *)  input
inputIndex: (int)  inputIndex
value: (int *)  value 

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

◆ tryFromBytes9WithInput:inputIndex:bitOffset:value:

+ (bool) tryFromBytes9WithInput: (NSMutableData *)  input
inputIndex: (int)  inputIndex
bitOffset: (int)  bitOffset
value: (int *)  value 

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