FMLiveSwitchDataBuffer Class Reference

Binary data buffer implementation. More...

Instance Methods

(bool) - and:offset:
 Performs a bitwise "and" operation on a value. More...
 
(FMLiveSwitchDataBuffer *) - appendWithBuffer:
 Appends a buffer. More...
 
(FMLiveSwitchDataBuffer *) - appendWithBuffers:
 Appends some buffers. More...
 
(bool) - canResizeWithNewLength:offset:
 Gets whether this buffer can be resized to the new length. More...
 
(FMLiveSwitchDataBuffer *) - clone
 Clones this instance. More...
 
(FMLiveSwitchDataBuffer *) - cloneWithLittleEndian:
 Clones this instance. More...
 
(FMLiveSwitchDataBuffer *) - copy
 Copies this instance into new memory. More...
 
(FMLiveSwitchDataBuffer *) - copyWithUsePool:
 Copies this instance. More...
 
(NSMutableData *) - data
 Gets the data. More...
 
(FMLiveSwitchDataBuffer *) - free
 Decrements the retain count by one and returns the Buffer to the pool if zero. More...
 
(int) - index
 Gets the index. More...
 
(NSMutableData *) - innerData
 Gets backing data buffer. More...
 
(bool) - isPooled
 Gets whether this DataBuffer is from a pool. More...
 
(bool) - isSubset
 Gets whether this DataBuffer is a subset. More...
 
(FMLiveSwitchDataBuffer *) - keep
 Increment the retain count by one. More...
 
(int) - length
 Gets the length. More...
 
(bool) - littleEndian
 Gets whether data is little-endian. More...
 
(bool) - or:offset:
 Performs a bitwise "or" operation on a value. More...
 
(FMLiveSwitchDataBuffer *) - prependWithBuffer:
 Prepends a buffer. More...
 
(void) - prependWithBuffers:
 Prepends some buffers. More...
 
(int) - read10SignedWithOffset:bitOffset:
 Reads a 10-bit signed value. More...
 
(int) - read10WithOffset:bitOffset:
 Reads a 10-bit value. More...
 
(int) - read11SignedWithOffset:bitOffset:
 Reads a 11-bit signed value. More...
 
(int) - read11WithOffset:bitOffset:
 Reads a 11-bit value. More...
 
(int) - read12SignedWithOffset:bitOffset:
 Reads a 12-bit signed value. More...
 
(int) - read12WithOffset:bitOffset:
 Reads a 12-bit value. More...
 
(int) - read13SignedWithOffset:bitOffset:
 Reads a 13-bit signed value. More...
 
(int) - read13WithOffset:bitOffset:
 Reads a 13-bit value. More...
 
(int) - read14SignedWithOffset:bitOffset:
 Reads a 14-bit signed value. More...
 
(int) - read14WithOffset:bitOffset:
 Reads a 14-bit value. More...
 
(int) - read15SignedWithOffset:bitOffset:
 Reads a 15-bit signed value. More...
 
(int) - read15WithOffset:bitOffset:
 Reads a 15-bit value. More...
 
(int) - read16SignedWithOffset:
 Reads a 16-bit signed value. More...
 
(int) - read16SignedWithOffset:offsetPlus:
 Reads a 16-bit signed value. More...
 
(int) - read16WithOffset:
 Reads a 16-bit value. More...
 
(int) - read16WithOffset:offsetPlus:
 Reads a 16-bit value. More...
 
(int) - read17SignedWithOffset:bitOffset:
 Reads a 17-bit signed value. More...
 
(int) - read17WithOffset:bitOffset:
 Reads a 17-bit value. More...
 
(int) - read18SignedWithOffset:bitOffset:
 Reads an 18-bit signed value. More...
 
(int) - read18WithOffset:bitOffset:
 Reads an 18-bit value. More...
 
(int) - read19SignedWithOffset:bitOffset:
 Reads a 19-bit signed value. More...
 
(int) - read19WithOffset:bitOffset:
 Reads a 19-bit value. More...
 
(bool) - read1WithOffset:bitOffset:
 Reads a 1-bit value. More...
 
(int) - read20SignedWithOffset:bitOffset:
 Reads a 20-bit signed value. More...
 
(int) - read20WithOffset:bitOffset:
 Reads a 20-bit value. More...
 
(int) - read21SignedWithOffset:bitOffset:
 Reads a 21-bit signed value. More...
 
(int) - read21WithOffset:bitOffset:
 Reads a 21-bit value. More...
 
(int) - read22SignedWithOffset:bitOffset:
 Reads a 22-bit signed value. More...
 
(int) - read22WithOffset:bitOffset:
 Reads a 22-bit value. More...
 
(int) - read23SignedWithOffset:bitOffset:
 Reads a 23-bit signed value. More...
 
(int) - read23WithOffset:bitOffset:
 Reads a 23-bit value. More...
 
(int) - read24SignedWithOffset:
 Reads a 24-bit signed value. More...
 
(int) - read24SignedWithOffset:offsetPlus:
 Reads a 24-bit signed value. More...
 
(int) - read24WithOffset:
 Reads a 24-bit value. More...
 
(int) - read24WithOffset:offsetPlus:
 Reads a 24-bit value. More...
 
(int) - read2SignedWithOffset:bitOffset:
 Reads a 2-bit signed value. More...
 
(int) - read2WithOffset:bitOffset:
 Reads a 2-bit value. More...
 
(long long) - read32SignedWithOffset:
 Reads a 32-bit signed value. More...
 
(long long) - read32SignedWithOffset:offsetPlus:
 Reads a 32-bit signed value. More...
 
(long long) - read32WithOffset:
 Reads a 32-bit value. More...
 
(long long) - read32WithOffset:offsetPlus:
 Reads a 32-bit value. More...
 
(int) - read3SignedWithOffset:bitOffset:
 Reads a 3-bit signed value. More...
 
(int) - read3WithOffset:bitOffset:
 Reads a 3-bit value. More...
 
(long long) - read40SignedWithOffset:
 Reads a 40-bit signed value. More...
 
(long long) - read40SignedWithOffset:offsetPlus:
 Reads a 40-bit signed value. More...
 
(long long) - read40WithOffset:
 Reads a 40-bit value. More...
 
(long long) - read40WithOffset:offsetPlus:
 Reads a 40-bit value. More...
 
(long long) - read48SignedWithOffset:
 Reads a 48-bit signed value. More...
 
(long long) - read48SignedWithOffset:offsetPlus:
 Reads a 48-bit signed value. More...
 
(long long) - read48WithOffset:
 Reads a 48-bit value. More...
 
(long long) - read48WithOffset:offsetPlus:
 Reads a 48-bit value. More...
 
(int) - read4SignedWithOffset:bitOffset:
 Reads a 4-bit signed value. More...
 
(int) - read4WithOffset:bitOffset:
 Reads a 4-bit value. More...
 
(long long) - read56SignedWithOffset:
 Reads a 56-bit signed value. More...
 
(long long) - read56SignedWithOffset:offsetPlus:
 Reads a 56-bit signed value. More...
 
(long long) - read56WithOffset:
 Reads a 56-bit value. More...
 
(long long) - read56WithOffset:offsetPlus:
 Reads a 56-bit value. More...
 
(int) - read5SignedWithOffset:bitOffset:
 Reads a 5-bit signed value. More...
 
(int) - read5WithOffset:bitOffset:
 Reads a 5-bit value. More...
 
(long long) - read64SignedWithOffset:
 Reads a 64-bit signed value. More...
 
(long long) - read64SignedWithOffset:offsetPlus:
 Reads a 64-bit signed value. More...
 
(long long) - read64WithOffset:
 Reads a 64-bit value. More...
 
(long long) - read64WithOffset:offsetPlus:
 Reads a 64-bit value. More...
 
(int) - read6SignedWithOffset:bitOffset:
 Reads a 6-bit signed value. More...
 
(int) - read6WithOffset:bitOffset:
 Reads a 6-bit value. More...
 
(int) - read7SignedWithOffset:bitOffset:
 Reads a 7-bit signed value. More...
 
(int) - read7WithOffset:bitOffset:
 Reads a 7-bit value. More...
 
(int) - read8SignedWithOffset:
 Reads an 8-bit signed value. More...
 
(int) - read8SignedWithOffset:offsetPlus:
 Reads an 8-bit signed value. More...
 
(int) - read8WithOffset:
 Reads an 8-bit value. More...
 
(int) - read8WithOffset:offsetPlus:
 Reads an 8-bit value. More...
 
(int) - read9SignedWithOffset:bitOffset:
 Reads a 9-bit signed value. More...
 
(int) - read9WithOffset:bitOffset:
 Reads a 9-bit value. More...
 
(NSString *) - readUtf8StringWithOffset:
 Read a UTF-8 string. More...
 
(NSString *) - readUtf8StringWithOffset:length:
 Reads a UTF-8 string. More...
 
(void) - resizeWithNewLength:
 Resizes this buffer to a new length with new data being inserted at the end. More...
 
(void) - resizeWithNewLength:offset:
 Resizes this buffer to a new length with new data being inserted at a given offset. More...
 
(void) - resizeWithNewLength:offset:setZero:
 Resizes this buffer to a new length with new data being inserted at a given offset. More...
 
(bool) - sequenceEqualsConstantTimeWithBuffer:
 Compares a data buffer for equality in constant time. More...
 
(bool) - sequenceEqualsWithBuffer:
 Compares a data buffer for equality. More...
 
(void) - set:
 Sets the data buffer to the specified value. More...
 
(void) - set:offset:
 Sets a subset of the data buffer to the specified value. More...
 
(void) - set:offset:length:
 Sets a subset of the data buffer to the specified value. More...
 
(void) - setInnerData:
 Sets backing data buffer. More...
 
(void) - setLittleEndian:
 Sets whether data is little-endian. More...
 
(FMLiveSwitchDataBuffer *) - subsetWithOffset:
 Gets a subset of this instance. More...
 
(FMLiveSwitchDataBuffer *) - subsetWithOffset:length:
 Gets a subset of this instance. More...
 
(NSMutableData *) - toArray
 Converts this instance to an array of bytes. More...
 
(NSMutableData *) - toBytes
 Converts this instance to an array of bytes. More...
 
(NSString *) - toHexString
 Converts this instance to a hexadecimal string. More...
 
(NSString *) - toJson
 Serializes this instance to JSON. More...
 
(bool) - tryKeep
 Attempts to increment the retain count by one. More...
 
(bool) - tryRead10WithOffset:bitOffset:value:
 Tries to read a 10-bit value. More...
 
(bool) - tryRead11WithOffset:bitOffset:value:
 Tries to read an 11-bit value. More...
 
(bool) - tryRead12WithOffset:bitOffset:value:
 Tries to read a 12-bit value. More...
 
(bool) - tryRead13WithOffset:bitOffset:value:
 Tries to read a 13-bit value. More...
 
(bool) - tryRead14WithOffset:bitOffset:value:
 Tries to read a 14-bit value. More...
 
(bool) - tryRead15WithOffset:bitOffset:value:
 Tries to read a 15-bit value. More...
 
(bool) - tryRead16WithOffset:value:
 Tries to read a 16-bit value. More...
 
(bool) - tryRead17WithOffset:bitOffset:value:
 Tries to read a 17-bit value. More...
 
(bool) - tryRead18WithOffset:bitOffset:value:
 Tries to read an 18-bit value. More...
 
(bool) - tryRead19WithOffset:bitOffset:value:
 Tries to read a 19-bit value. More...
 
(bool) - tryRead1WithOffset:bitOffset:value:
 Tries to read a 1-bit value. More...
 
(bool) - tryRead20WithOffset:bitOffset:value:
 Tries to read a 20-bit value. More...
 
(bool) - tryRead21WithOffset:bitOffset:value:
 Tries to read a 21-bit value. More...
 
(bool) - tryRead22WithOffset:bitOffset:value:
 Tries to read a 22-bit value. More...
 
(bool) - tryRead23WithOffset:bitOffset:value:
 Tries to read a 23-bit value. More...
 
(bool) - tryRead24WithOffset:value:
 Tries to read a 24-bit value. More...
 
(bool) - tryRead2WithOffset:bitOffset:value:
 Tries to read a 2-bit value. More...
 
(bool) - tryRead32WithOffset:value:
 Tries to read a 32-bit value. More...
 
(bool) - tryRead3WithOffset:bitOffset:value:
 Tries to read a 3-bit value. More...
 
(bool) - tryRead40WithOffset:value:
 Tries to read a 40-bit value. More...
 
(bool) - tryRead48WithOffset:value:
 Tries to read a 48-bit value. More...
 
(bool) - tryRead4WithOffset:bitOffset:value:
 Tries to read a 4-bit value. More...
 
(bool) - tryRead56WithOffset:value:
 Tries to read a 56-bit value. More...
 
(bool) - tryRead5WithOffset:bitOffset:value:
 Tries to read a 5-bit value. More...
 
(bool) - tryRead64WithOffset:value:
 Tries to read a 64-bit value. More...
 
(bool) - tryRead6WithOffset:bitOffset:value:
 Tries to read a 6-bit value. More...
 
(bool) - tryRead7WithOffset:bitOffset:value:
 Tries to read a 7-bit value. More...
 
(bool) - tryRead8WithOffset:value:
 Tries to read an 8-bit value. More...
 
(bool) - tryRead9WithOffset:bitOffset:value:
 Tries to read a 9-bit value. More...
 
(bool) - write1:offset:bitOffset:
 Writes a 1-bit value. More...
 
(bool) - write10:offset:bitOffset:
 Writes a 10-bit value. More...
 
(bool) - write11:offset:bitOffset:
 Writes an 11-bit value. More...
 
(bool) - write12:offset:bitOffset:
 Writes a 12-bit value. More...
 
(bool) - write13:offset:bitOffset:
 Writes a 13-bit value. More...
 
(bool) - write14:offset:bitOffset:
 Writes a 14-bit value. More...
 
(bool) - write15:offset:bitOffset:
 Writes a 15-bit value. More...
 
(bool) - write16:offset:
 Writes a 16-bit value. More...
 
(bool) - write16:offset:offsetPlus:
 Writes a 16-bit value. More...
 
(bool) - write16Signed:offset:
 Writes a signed 16-bit value. More...
 
(bool) - write17:offset:bitOffset:
 Writes a 17-bit value. More...
 
(bool) - write18:offset:bitOffset:
 Writes an 18-bit value. More...
 
(bool) - write19:offset:bitOffset:
 Writes a 19-bit value. More...
 
(bool) - write2:offset:bitOffset:
 Writes a 2-bit value. More...
 
(bool) - write20:offset:bitOffset:
 Writes a 20-bit value. More...
 
(bool) - write21:offset:bitOffset:
 Writes a 21-bit value. More...
 
(bool) - write22:offset:bitOffset:
 Writes a 22-bit value. More...
 
(bool) - write23:offset:bitOffset:
 Writes a 23-bit value. More...
 
(bool) - write24:offset:
 Writes a 24-bit value. More...
 
(bool) - write24:offset:offsetPlus:
 Writes a 24-bit value. More...
 
(bool) - write3:offset:bitOffset:
 Writes a 3-bit value. More...
 
(bool) - write32:offset:
 Writes a 32-bit value. More...
 
(bool) - write32:offset:offsetPlus:
 Writes a 32-bit value. More...
 
(bool) - write4:offset:bitOffset:
 Writes a 4-bit value. More...
 
(bool) - write40:offset:
 Writes a 40-bit value. More...
 
(bool) - write40:offset:offsetPlus:
 Writes a 40-bit value. More...
 
(bool) - write48:offset:
 Writes a 48-bit value. More...
 
(bool) - write48:offset:offsetPlus:
 Writes a 48-bit value. More...
 
(bool) - write5:offset:bitOffset:
 Writes a 5-bit value. More...
 
(bool) - write56:offset:
 Writes a 56-bit value. More...
 
(bool) - write56:offset:offsetPlus:
 Writes a 56-bit value. More...
 
(bool) - write6:offset:bitOffset:
 Writes a 6-bit value. More...
 
(bool) - write64:offset:
 Writes a 64-bit value. More...
 
(bool) - write64:offset:offsetPlus:
 Writes a 64-bit value. More...
 
(bool) - write7:offset:bitOffset:
 Writes a 7-bit value. More...
 
(bool) - write8:offset:
 Writes an 8-bit value. More...
 
(bool) - write8:offset:offsetPlus:
 Writes an 8-bit value. More...
 
(bool) - write9:offset:bitOffset:
 Writes a 9-bit value. More...
 
(void) - writeBytes:
 Writes a byte array to this instance. More...
 
(void) - writeBytes:bytesIndex:bytesLength:offset:
 Writes a byte array to this instance. More...
 
(void) - writeBytes:bytesIndex:bytesLength:offset:offsetPlus:
 Writes a byte array to this instance. More...
 
(void) - writeBytes:bytesIndex:offset:
 Writes a byte array to this instance. More...
 
(void) - writeBytes:offset:
 Writes a byte array to this instance. More...
 
(void) - writeWithBuffer:
 Writes a data buffer to this instance. More...
 
(void) - writeWithBuffer:offset:
 Writes a data buffer to this instance. More...
 
(void) - writeWithBuffer:offset:offsetPlus:
 Writes a data buffer to this instance. More...
 
(bool) - xor:offset:
 Performs a bitwise "xor" operation on a value. More...
 

Class Methods

(FMLiveSwitchDataBuffer *) + allocateWithCount:
 Allocates a new data buffer with a given size (in bytes) in big-endian format. More...
 
(FMLiveSwitchDataBuffer *) + allocateWithCount:littleEndian:
 Allocates a new data buffer with a given size (in bytes). More...
 
(bool) + areEqualWithBuffer1:buffer2:
 Tests if the two buffers have equal contents. More...
 
(FMLiveSwitchDataBuffer *) + empty
 Gets an empty data buffer. More...
 
(FMLiveSwitchDataBuffer *) + fromBytes:
 Creates an instance from an array of bytes. More...
 
(FMLiveSwitchDataBuffer *) + fromBytes:littleEndian:
 Creates an instance from an array of bytes. More...
 
(FMLiveSwitchDataBuffer *) + fromHexString:
 Creates an instance from a hexadecimal string. More...
 
(FMLiveSwitchDataBuffer *) + fromHexString:littleEndian:
 Creates an instance from a hexadecimal string. More...
 
(NSMutableArray *) + fromJsonArrayWithDataBuffersJson:
 Deserializes an array of instances from JSON. More...
 
(FMLiveSwitchDataBuffer *) + fromJsonWithDataBufferJson:
 Deserializes an instance from JSON. More...
 
(NSString *) + toJsonArrayWithDataBuffers:
 Serializes an array of instances to JSON. More...
 
(NSString *) + toJsonWithDataBuffer:
 Serializes an instance to JSON. More...
 
(FMLiveSwitchDataBuffer *) + wrapWithData:
 Produces a new data buffer containing supplied data in big-endian format. More...
 
(FMLiveSwitchDataBuffer *) + wrapWithData:index:
 Produces a new data buffer containing supplied data in big-endian format. More...
 
(FMLiveSwitchDataBuffer *) + wrapWithData:index:length:
 Produces a new data buffer containing supplied data in big-endian format. More...
 
(FMLiveSwitchDataBuffer *) + wrapWithData:index:length:littleEndian:
 Produces a new data buffer containing supplied data. More...
 
(FMLiveSwitchDataBuffer *) + wrapWithData:index:littleEndian:
 Produces a new data buffer containing supplied data. More...
 
(FMLiveSwitchDataBuffer *) + wrapWithData:littleEndian:
 Produces a new data buffer containing supplied data. More...
 

Detailed Description

Binary data buffer implementation.

Method Documentation

◆ allocateWithCount:

+ (FMLiveSwitchDataBuffer*) allocateWithCount: (int)  count

Allocates a new data buffer with a given size (in bytes) in big-endian format.

Parameters
countPre-allocated data buffer size (in bytes).

◆ allocateWithCount:littleEndian:

+ (FMLiveSwitchDataBuffer*) allocateWithCount: (int)  count
littleEndian: (bool)  littleEndian 

Allocates a new data buffer with a given size (in bytes).

Parameters
countPre-allocated data buffer size (in bytes).
littleEndianWhether the data is little-endian.

◆ and:offset:

- (bool) and: (int)  value
offset: (int)  offset 

Performs a bitwise "and" operation on a value.

Parameters
valueThe value.
offsetThe offset.

◆ appendWithBuffer:

- (FMLiveSwitchDataBuffer*) appendWithBuffer: (FMLiveSwitchDataBuffer *)  buffer

Appends a buffer.

Parameters
bufferThe buffer.

Implemented in FMLiveSwitchDataBufferSubset.

◆ appendWithBuffers:

- (FMLiveSwitchDataBuffer*) appendWithBuffers: (NSMutableArray *)  buffers

Appends some buffers.

Parameters
buffersThe buffers.

Implemented in FMLiveSwitchDataBufferSubset.

◆ areEqualWithBuffer1:buffer2:

+ (bool) areEqualWithBuffer1: (FMLiveSwitchDataBuffer *)  buffer1
buffer2: (FMLiveSwitchDataBuffer *)  buffer2 

Tests if the two buffers have equal contents.

Parameters
buffer1First buffer to test.
buffer2Second buffer to test.

◆ canResizeWithNewLength:offset:

- (bool) canResizeWithNewLength: (int)  newLength
offset: (int)  offset 

Gets whether this buffer can be resized to the new length.

Parameters
newLengthThe new length.
offsetThe offset.

◆ clone

Clones this instance.

◆ cloneWithLittleEndian:

- (FMLiveSwitchDataBuffer*) cloneWithLittleEndian: (bool)  littleEndian

Clones this instance.

Parameters
littleEndianWhether to clone into a little endian buffer.

◆ copy

Copies this instance into new memory.

◆ copyWithUsePool:

- (FMLiveSwitchDataBuffer*) copyWithUsePool: (bool)  usePool

Copies this instance.

◆ data

- (NSMutableData*) data

Gets the data.

Implemented in FMLiveSwitchDataBufferSubset, and FMLiveSwitchCircularDataBuffer.

◆ empty

Gets an empty data buffer.

◆ free

Decrements the retain count by one and returns the Buffer to the pool if zero.

Implemented in FMLiveSwitchDataBufferSubset, FMLiveSwitchDataBufferPooled, and FMLiveSwitchCircularDataBuffer.

◆ fromBytes:

+ (FMLiveSwitchDataBuffer*) fromBytes: (NSMutableData *)  bytes

Creates an instance from an array of bytes.

◆ fromBytes:littleEndian:

+ (FMLiveSwitchDataBuffer*) fromBytes: (NSMutableData *)  bytes
littleEndian: (bool)  littleEndian 

Creates an instance from an array of bytes.

◆ fromHexString:

+ (FMLiveSwitchDataBuffer*) fromHexString: (NSString *)  hexString

Creates an instance from a hexadecimal string.

◆ fromHexString:littleEndian:

+ (FMLiveSwitchDataBuffer*) fromHexString: (NSString *)  hexString
littleEndian: (bool)  littleEndian 

Creates an instance from a hexadecimal string.

◆ fromJsonArrayWithDataBuffersJson:

+ (NSMutableArray*) fromJsonArrayWithDataBuffersJson: (NSString *)  dataBuffersJson

Deserializes an array of instances from JSON.

Parameters
dataBuffersJsonThe data buffers JSON.

◆ fromJsonWithDataBufferJson:

+ (FMLiveSwitchDataBuffer*) fromJsonWithDataBufferJson: (NSString *)  dataBufferJson

Deserializes an instance from JSON.

Parameters
dataBufferJsonThe data buffer JSON.

◆ index

- (int) index

Gets the index.

◆ innerData

- (NSMutableData*) innerData

Gets backing data buffer.

◆ isPooled

- (bool) isPooled

Gets whether this DataBuffer is from a pool.

Implemented in FMLiveSwitchDataBufferSubset, and FMLiveSwitchDataBufferPooled.

◆ isSubset

- (bool) isSubset

Gets whether this DataBuffer is a subset.

Implemented in FMLiveSwitchDataBufferSubset.

◆ keep

Increment the retain count by one.

Implemented in FMLiveSwitchDataBufferSubset, and FMLiveSwitchDataBufferPooled.

◆ length

- (int) length

Gets the length.

◆ littleEndian

- (bool) littleEndian

Gets whether data is little-endian.

◆ or:offset:

- (bool) or: (int)  value
offset: (int)  offset 

Performs a bitwise "or" operation on a value.

Parameters
valueThe value.
offsetThe offset.

◆ prependWithBuffer:

- (FMLiveSwitchDataBuffer*) prependWithBuffer: (FMLiveSwitchDataBuffer *)  buffer

Prepends a buffer.

Parameters
bufferThe buffer.

Implemented in FMLiveSwitchDataBufferSubset.

◆ prependWithBuffers:

- (void) prependWithBuffers: (NSMutableArray *)  buffers

Prepends some buffers.

Parameters
buffersThe buffers.

Implemented in FMLiveSwitchDataBufferSubset.

◆ read10SignedWithOffset:bitOffset:

- (int) read10SignedWithOffset: (int)  offset
bitOffset: (int)  bitOffset 

Reads a 10-bit signed value.

Parameters
offsetThe offset.
bitOffsetThe bit offset.

◆ read10WithOffset:bitOffset:

- (int) read10WithOffset: (int)  offset
bitOffset: (int)  bitOffset 

Reads a 10-bit value.

Parameters
offsetThe offset.
bitOffsetThe bitoffset.

◆ read11SignedWithOffset:bitOffset:

- (int) read11SignedWithOffset: (int)  offset
bitOffset: (int)  bitOffset 

Reads a 11-bit signed value.

Parameters
offsetThe offset.
bitOffsetThe bit offset.

◆ read11WithOffset:bitOffset:

- (int) read11WithOffset: (int)  offset
bitOffset: (int)  bitOffset 

Reads a 11-bit value.

Parameters
offsetThe offset.
bitOffsetThe bitoffset.

◆ read12SignedWithOffset:bitOffset:

- (int) read12SignedWithOffset: (int)  offset
bitOffset: (int)  bitOffset 

Reads a 12-bit signed value.

Parameters
offsetThe offset.
bitOffsetThe bit offset.

◆ read12WithOffset:bitOffset:

- (int) read12WithOffset: (int)  offset
bitOffset: (int)  bitOffset 

Reads a 12-bit value.

Parameters
offsetThe offset.
bitOffsetThe bitoffset.

◆ read13SignedWithOffset:bitOffset:

- (int) read13SignedWithOffset: (int)  offset
bitOffset: (int)  bitOffset 

Reads a 13-bit signed value.

Parameters
offsetThe offset.
bitOffsetThe bit offset.

◆ read13WithOffset:bitOffset:

- (int) read13WithOffset: (int)  offset
bitOffset: (int)  bitOffset 

Reads a 13-bit value.

Parameters
offsetThe offset.
bitOffsetThe bitoffset.

◆ read14SignedWithOffset:bitOffset:

- (int) read14SignedWithOffset: (int)  offset
bitOffset: (int)  bitOffset 

Reads a 14-bit signed value.

Parameters
offsetThe offset.
bitOffsetThe bit offset.

◆ read14WithOffset:bitOffset:

- (int) read14WithOffset: (int)  offset
bitOffset: (int)  bitOffset 

Reads a 14-bit value.

Parameters
offsetThe offset.
bitOffsetThe bit offset.

◆ read15SignedWithOffset:bitOffset:

- (int) read15SignedWithOffset: (int)  offset
bitOffset: (int)  bitOffset 

Reads a 15-bit signed value.

Parameters
offsetThe offset.
bitOffsetThe bit offset.

◆ read15WithOffset:bitOffset:

- (int) read15WithOffset: (int)  offset
bitOffset: (int)  bitOffset 

Reads a 15-bit value.

Parameters
offsetThe offset.
bitOffsetThe bit offset.

◆ read16SignedWithOffset:

- (int) read16SignedWithOffset: (int)  offset

Reads a 16-bit signed value.

Parameters
offsetThe offset.

◆ read16SignedWithOffset:offsetPlus:

- (int) read16SignedWithOffset: (int)  offset
offsetPlus: (int *)  offsetPlus 

Reads a 16-bit signed value.

Parameters
offsetThe offset.
offsetPlusThe offset plus the value length.

◆ read16WithOffset:

- (int) read16WithOffset: (int)  offset

Reads a 16-bit value.

Parameters
offsetThe offset.

◆ read16WithOffset:offsetPlus:

- (int) read16WithOffset: (int)  offset
offsetPlus: (int *)  offsetPlus 

Reads a 16-bit value.

Parameters
offsetThe offset.
offsetPlusThe offset plus the value length.

◆ read17SignedWithOffset:bitOffset:

- (int) read17SignedWithOffset: (int)  offset
bitOffset: (int)  bitOffset 

Reads a 17-bit signed value.

Parameters
offsetThe offset.
bitOffsetThe bit offset.

◆ read17WithOffset:bitOffset:

- (int) read17WithOffset: (int)  offset
bitOffset: (int)  bitOffset 

Reads a 17-bit value.

Parameters
offsetThe offset.
bitOffsetThe bit offset.

◆ read18SignedWithOffset:bitOffset:

- (int) read18SignedWithOffset: (int)  offset
bitOffset: (int)  bitOffset 

Reads an 18-bit signed value.

Parameters
offsetThe offset.
bitOffsetThe bit offset.

◆ read18WithOffset:bitOffset:

- (int) read18WithOffset: (int)  offset
bitOffset: (int)  bitOffset 

Reads an 18-bit value.

Parameters
offsetThe offset.
bitOffsetThe bit offset.

◆ read19SignedWithOffset:bitOffset:

- (int) read19SignedWithOffset: (int)  offset
bitOffset: (int)  bitOffset 

Reads a 19-bit signed value.

Parameters
offsetThe offset.
bitOffsetThe bit offset.

◆ read19WithOffset:bitOffset:

- (int) read19WithOffset: (int)  offset
bitOffset: (int)  bitOffset 

Reads a 19-bit value.

Parameters
offsetThe offset.
bitOffsetThe bit offset.

◆ read1WithOffset:bitOffset:

- (bool) read1WithOffset: (int)  offset
bitOffset: (int)  bitOffset 

Reads a 1-bit value.

Parameters
offsetThe offset.
bitOffsetThe bit offset.

◆ read20SignedWithOffset:bitOffset:

- (int) read20SignedWithOffset: (int)  offset
bitOffset: (int)  bitOffset 

Reads a 20-bit signed value.

Parameters
offsetThe offset.
bitOffsetThe bit offset.

◆ read20WithOffset:bitOffset:

- (int) read20WithOffset: (int)  offset
bitOffset: (int)  bitOffset 

Reads a 20-bit value.

Parameters
offsetThe offset.
bitOffsetThe bit offset.

◆ read21SignedWithOffset:bitOffset:

- (int) read21SignedWithOffset: (int)  offset
bitOffset: (int)  bitOffset 

Reads a 21-bit signed value.

Parameters
offsetThe offset.
bitOffsetThe bit offset.

◆ read21WithOffset:bitOffset:

- (int) read21WithOffset: (int)  offset
bitOffset: (int)  bitOffset 

Reads a 21-bit value.

Parameters
offsetThe offset.
bitOffsetThe bit offset.

◆ read22SignedWithOffset:bitOffset:

- (int) read22SignedWithOffset: (int)  offset
bitOffset: (int)  bitOffset 

Reads a 22-bit signed value.

Parameters
offsetThe offset.
bitOffsetThe bit offset.

◆ read22WithOffset:bitOffset:

- (int) read22WithOffset: (int)  offset
bitOffset: (int)  bitOffset 

Reads a 22-bit value.

Parameters
offsetThe offset.
bitOffsetThe bit offset.

◆ read23SignedWithOffset:bitOffset:

- (int) read23SignedWithOffset: (int)  offset
bitOffset: (int)  bitOffset 

Reads a 23-bit signed value.

Parameters
offsetThe offset.
bitOffsetThe bit offset.

◆ read23WithOffset:bitOffset:

- (int) read23WithOffset: (int)  offset
bitOffset: (int)  bitOffset 

Reads a 23-bit value.

Parameters
offsetThe offset.
bitOffsetThe bit offset.

◆ read24SignedWithOffset:

- (int) read24SignedWithOffset: (int)  offset

Reads a 24-bit signed value.

Parameters
offsetThe offset.

◆ read24SignedWithOffset:offsetPlus:

- (int) read24SignedWithOffset: (int)  offset
offsetPlus: (int *)  offsetPlus 

Reads a 24-bit signed value.

Parameters
offsetThe offset.
offsetPlusThe offset plus the value length.

◆ read24WithOffset:

- (int) read24WithOffset: (int)  offset

Reads a 24-bit value.

Parameters
offsetThe offset.

◆ read24WithOffset:offsetPlus:

- (int) read24WithOffset: (int)  offset
offsetPlus: (int *)  offsetPlus 

Reads a 24-bit value.

Parameters
offsetThe offset.
offsetPlusThe offset plus the value length.

◆ read2SignedWithOffset:bitOffset:

- (int) read2SignedWithOffset: (int)  offset
bitOffset: (int)  bitOffset 

Reads a 2-bit signed value.

Parameters
offsetThe offset.
bitOffsetThe bit offset.

◆ read2WithOffset:bitOffset:

- (int) read2WithOffset: (int)  offset
bitOffset: (int)  bitOffset 

Reads a 2-bit value.

Parameters
offsetThe offset.
bitOffsetThe bit offset.

◆ read32SignedWithOffset:

- (long long) read32SignedWithOffset: (int)  offset

Reads a 32-bit signed value.

Parameters
offsetThe offset.

◆ read32SignedWithOffset:offsetPlus:

- (long long) read32SignedWithOffset: (int)  offset
offsetPlus: (int *)  offsetPlus 

Reads a 32-bit signed value.

Parameters
offsetThe offset.
offsetPlusThe offset plus the value length.

◆ read32WithOffset:

- (long long) read32WithOffset: (int)  offset

Reads a 32-bit value.

Parameters
offsetThe offset.

◆ read32WithOffset:offsetPlus:

- (long long) read32WithOffset: (int)  offset
offsetPlus: (int *)  offsetPlus 

Reads a 32-bit value.

Parameters
offsetThe offset.
offsetPlusThe offset plus the value length.

◆ read3SignedWithOffset:bitOffset:

- (int) read3SignedWithOffset: (int)  offset
bitOffset: (int)  bitOffset 

Reads a 3-bit signed value.

Parameters
offsetThe offset.
bitOffsetThe bit offset.

◆ read3WithOffset:bitOffset:

- (int) read3WithOffset: (int)  offset
bitOffset: (int)  bitOffset 

Reads a 3-bit value.

Parameters
offsetThe offset.
bitOffsetThe bit offset.

◆ read40SignedWithOffset:

- (long long) read40SignedWithOffset: (int)  offset

Reads a 40-bit signed value.

Parameters
offsetThe offset.

◆ read40SignedWithOffset:offsetPlus:

- (long long) read40SignedWithOffset: (int)  offset
offsetPlus: (int *)  offsetPlus 

Reads a 40-bit signed value.

Parameters
offsetThe offset.
offsetPlusThe offset plus the value length.

◆ read40WithOffset:

- (long long) read40WithOffset: (int)  offset

Reads a 40-bit value.

Parameters
offsetThe offset.

◆ read40WithOffset:offsetPlus:

- (long long) read40WithOffset: (int)  offset
offsetPlus: (int *)  offsetPlus 

Reads a 40-bit value.

Parameters
offsetThe offset.
offsetPlusThe offset plus the value length.

◆ read48SignedWithOffset:

- (long long) read48SignedWithOffset: (int)  offset

Reads a 48-bit signed value.

Parameters
offsetThe offset.

◆ read48SignedWithOffset:offsetPlus:

- (long long) read48SignedWithOffset: (int)  offset
offsetPlus: (int *)  offsetPlus 

Reads a 48-bit signed value.

Parameters
offsetThe offset.
offsetPlusThe offset plus the value length.

◆ read48WithOffset:

- (long long) read48WithOffset: (int)  offset

Reads a 48-bit value.

Parameters
offsetThe offset.

◆ read48WithOffset:offsetPlus:

- (long long) read48WithOffset: (int)  offset
offsetPlus: (int *)  offsetPlus 

Reads a 48-bit value.

Parameters
offsetThe offset.
offsetPlusThe offset plus the value length.

◆ read4SignedWithOffset:bitOffset:

- (int) read4SignedWithOffset: (int)  offset
bitOffset: (int)  bitOffset 

Reads a 4-bit signed value.

Parameters
offsetThe offset.
bitOffsetThe bit offset.

◆ read4WithOffset:bitOffset:

- (int) read4WithOffset: (int)  offset
bitOffset: (int)  bitOffset 

Reads a 4-bit value.

Parameters
offsetThe offset.
bitOffsetThe bit offset.

◆ read56SignedWithOffset:

- (long long) read56SignedWithOffset: (int)  offset

Reads a 56-bit signed value.

Parameters
offsetThe offset.

◆ read56SignedWithOffset:offsetPlus:

- (long long) read56SignedWithOffset: (int)  offset
offsetPlus: (int *)  offsetPlus 

Reads a 56-bit signed value.

Parameters
offsetThe offset.
offsetPlusThe offset plus the value length.

◆ read56WithOffset:

- (long long) read56WithOffset: (int)  offset

Reads a 56-bit value.

Parameters
offsetThe offset.

◆ read56WithOffset:offsetPlus:

- (long long) read56WithOffset: (int)  offset
offsetPlus: (int *)  offsetPlus 

Reads a 56-bit value.

Parameters
offsetThe offset.
offsetPlusThe offset plus the value length.

◆ read5SignedWithOffset:bitOffset:

- (int) read5SignedWithOffset: (int)  offset
bitOffset: (int)  bitOffset 

Reads a 5-bit signed value.

Parameters
offsetThe offset.
bitOffsetThe bit offset.

◆ read5WithOffset:bitOffset:

- (int) read5WithOffset: (int)  offset
bitOffset: (int)  bitOffset 

Reads a 5-bit value.

Parameters
offsetThe offset.
bitOffsetThe bit offset.

◆ read64SignedWithOffset:

- (long long) read64SignedWithOffset: (int)  offset

Reads a 64-bit signed value.

Parameters
offsetThe offset.

◆ read64SignedWithOffset:offsetPlus:

- (long long) read64SignedWithOffset: (int)  offset
offsetPlus: (int *)  offsetPlus 

Reads a 64-bit signed value.

Parameters
offsetThe offset.
offsetPlusThe offset plus the value length.

◆ read64WithOffset:

- (long long) read64WithOffset: (int)  offset

Reads a 64-bit value.

Parameters
offsetThe offset.

◆ read64WithOffset:offsetPlus:

- (long long) read64WithOffset: (int)  offset
offsetPlus: (int *)  offsetPlus 

Reads a 64-bit value.

Parameters
offsetThe offset.
offsetPlusThe offset plus the value length.

◆ read6SignedWithOffset:bitOffset:

- (int) read6SignedWithOffset: (int)  offset
bitOffset: (int)  bitOffset 

Reads a 6-bit signed value.

Parameters
offsetThe offset.
bitOffsetThe bit offset.

◆ read6WithOffset:bitOffset:

- (int) read6WithOffset: (int)  offset
bitOffset: (int)  bitOffset 

Reads a 6-bit value.

Parameters
offsetThe offset.
bitOffsetThe bit offset.

◆ read7SignedWithOffset:bitOffset:

- (int) read7SignedWithOffset: (int)  offset
bitOffset: (int)  bitOffset 

Reads a 7-bit signed value.

Parameters
offsetThe offset.
bitOffsetThe bit offset.

◆ read7WithOffset:bitOffset:

- (int) read7WithOffset: (int)  offset
bitOffset: (int)  bitOffset 

Reads a 7-bit value.

Parameters
offsetThe offset.
bitOffsetThe bit offset.

◆ read8SignedWithOffset:

- (int) read8SignedWithOffset: (int)  offset

Reads an 8-bit signed value.

Parameters
offsetThe offset.

◆ read8SignedWithOffset:offsetPlus:

- (int) read8SignedWithOffset: (int)  offset
offsetPlus: (int *)  offsetPlus 

Reads an 8-bit signed value.

Parameters
offsetThe offset.
offsetPlusThe offset plus the value length.

◆ read8WithOffset:

- (int) read8WithOffset: (int)  offset

Reads an 8-bit value.

Parameters
offsetThe offset.

◆ read8WithOffset:offsetPlus:

- (int) read8WithOffset: (int)  offset
offsetPlus: (int *)  offsetPlus 

Reads an 8-bit value.

Parameters
offsetThe offset.
offsetPlusThe offset plus the value length.

◆ read9SignedWithOffset:bitOffset:

- (int) read9SignedWithOffset: (int)  offset
bitOffset: (int)  bitOffset 

Reads a 9-bit signed value.

Parameters
offsetThe offset.
bitOffsetThe bit offset.

◆ read9WithOffset:bitOffset:

- (int) read9WithOffset: (int)  offset
bitOffset: (int)  bitOffset 

Reads a 9-bit value.

Parameters
offsetThe offset.
bitOffsetThe bitoffset.

◆ readUtf8StringWithOffset:

- (NSString*) readUtf8StringWithOffset: (int)  offset

Read a UTF-8 string.

Parameters
offsetThe offset.

◆ readUtf8StringWithOffset:length:

- (NSString*) readUtf8StringWithOffset: (int)  offset
length: (int)  length 

Reads a UTF-8 string.

Parameters
offsetThe offset.
lengthThe length.

◆ resizeWithNewLength:

- (void) resizeWithNewLength: (int)  newLength

Resizes this buffer to a new length with new data being inserted at the end.

Parameters
newLengthThe new length.

◆ resizeWithNewLength:offset:

- (void) resizeWithNewLength: (int)  newLength
offset: (int)  offset 

Resizes this buffer to a new length with new data being inserted at a given offset.

Parameters
newLengthThe new length.
offsetThe offset.

◆ resizeWithNewLength:offset:setZero:

- (void) resizeWithNewLength: (int)  newLength
offset: (int)  offset
setZero: (bool)  setZero 

Resizes this buffer to a new length with new data being inserted at a given offset.

Parameters
newLengthThe new length.
offsetThe offset.
setZeroSets empty space to zero.

◆ sequenceEqualsConstantTimeWithBuffer:

- (bool) sequenceEqualsConstantTimeWithBuffer: (FMLiveSwitchDataBuffer *)  buffer

Compares a data buffer for equality in constant time.

Parameters
bufferThe buffer.
Returns
true if the sequences are equal; otherwise, false.

◆ sequenceEqualsWithBuffer:

- (bool) sequenceEqualsWithBuffer: (FMLiveSwitchDataBuffer *)  buffer

Compares a data buffer for equality.

Parameters
bufferThe data buffer.
Returns
true if the sequences are equal; otherwise, false.

◆ set:

- (void) set: (uint8_t)  value

Sets the data buffer to the specified value.

Parameters
valueThe value.

◆ set:offset:

- (void) set: (uint8_t)  value
offset: (int)  offset 

Sets a subset of the data buffer to the specified value.

Parameters
valueThe value.
offsetThe offset.

◆ set:offset:length:

- (void) set: (uint8_t)  value
offset: (int)  offset
length: (int)  length 

Sets a subset of the data buffer to the specified value.

Parameters
valueThe value.
offsetThe offset.
lengthThe length.

◆ setInnerData:

- (void) setInnerData: (NSMutableData *)  value

Sets backing data buffer.

◆ setLittleEndian:

- (void) setLittleEndian: (bool)  value

Sets whether data is little-endian.

◆ subsetWithOffset:

- (FMLiveSwitchDataBuffer*) subsetWithOffset: (int)  offset

Gets a subset of this instance.

Parameters
offsetThe offset.

Implemented in FMLiveSwitchDataBufferSubset.

◆ subsetWithOffset:length:

- (FMLiveSwitchDataBuffer*) subsetWithOffset: (int)  offset
length: (int)  length 

Gets a subset of this instance.

Parameters
offsetThe offset.
lengthThe length.

Implemented in FMLiveSwitchDataBufferSubset.

◆ toArray

- (NSMutableData*) toArray

Converts this instance to an array of bytes.

◆ toBytes

- (NSMutableData*) toBytes

Converts this instance to an array of bytes.

◆ toHexString

- (NSString*) toHexString

Converts this instance to a hexadecimal string.

◆ toJson

- (NSString*) toJson

Serializes this instance to JSON.

◆ toJsonArrayWithDataBuffers:

+ (NSString*) toJsonArrayWithDataBuffers: (NSMutableArray *)  dataBuffers

Serializes an array of instances to JSON.

Parameters
dataBuffersThe data buffers.

◆ toJsonWithDataBuffer:

+ (NSString*) toJsonWithDataBuffer: (FMLiveSwitchDataBuffer *)  dataBuffer

Serializes an instance to JSON.

Parameters
dataBufferThe data buffer.

◆ tryKeep

- (bool) tryKeep

Attempts to increment the retain count by one.

Returns
True if successful.

◆ tryRead10WithOffset:bitOffset:value:

- (bool) tryRead10WithOffset: (int)  offset
bitOffset: (int)  bitOffset
value: (int *)  value 

Tries to read a 10-bit value.

Parameters
offsetThe offset.
bitOffsetThe bit offset.
valueThe value.

◆ tryRead11WithOffset:bitOffset:value:

- (bool) tryRead11WithOffset: (int)  offset
bitOffset: (int)  bitOffset
value: (int *)  value 

Tries to read an 11-bit value.

Parameters
offsetThe offset.
bitOffsetThe bit offset.
valueThe value.

◆ tryRead12WithOffset:bitOffset:value:

- (bool) tryRead12WithOffset: (int)  offset
bitOffset: (int)  bitOffset
value: (int *)  value 

Tries to read a 12-bit value.

Parameters
offsetThe offset.
bitOffsetThe bit offset.
valueThe value.

◆ tryRead13WithOffset:bitOffset:value:

- (bool) tryRead13WithOffset: (int)  offset
bitOffset: (int)  bitOffset
value: (int *)  value 

Tries to read a 13-bit value.

Parameters
offsetThe offset.
bitOffsetThe bit offset.
valueThe value.

◆ tryRead14WithOffset:bitOffset:value:

- (bool) tryRead14WithOffset: (int)  offset
bitOffset: (int)  bitOffset
value: (int *)  value 

Tries to read a 14-bit value.

Parameters
offsetThe offset.
bitOffsetThe bit offset.
valueThe value.

◆ tryRead15WithOffset:bitOffset:value:

- (bool) tryRead15WithOffset: (int)  offset
bitOffset: (int)  bitOffset
value: (int *)  value 

Tries to read a 15-bit value.

Parameters
offsetThe offset.
bitOffsetThe bit offset.
valueThe value.

◆ tryRead16WithOffset:value:

- (bool) tryRead16WithOffset: (int)  offset
value: (int *)  value 

Tries to read a 16-bit value.

Parameters
offsetThe offset.
valueThe value.

◆ tryRead17WithOffset:bitOffset:value:

- (bool) tryRead17WithOffset: (int)  offset
bitOffset: (int)  bitOffset
value: (int *)  value 

Tries to read a 17-bit value.

Parameters
offsetThe offset.
bitOffsetThe bit offset.
valueThe value.

◆ tryRead18WithOffset:bitOffset:value:

- (bool) tryRead18WithOffset: (int)  offset
bitOffset: (int)  bitOffset
value: (int *)  value 

Tries to read an 18-bit value.

Parameters
offsetThe offset.
bitOffsetThe bit offset.
valueThe value.

◆ tryRead19WithOffset:bitOffset:value:

- (bool) tryRead19WithOffset: (int)  offset
bitOffset: (int)  bitOffset
value: (int *)  value 

Tries to read a 19-bit value.

Parameters
offsetThe offset.
bitOffsetThe bit offset.
valueThe value.

◆ tryRead1WithOffset:bitOffset:value:

- (bool) tryRead1WithOffset: (int)  offset
bitOffset: (int)  bitOffset
value: (bool *)  value 

Tries to read a 1-bit value.

Parameters
offsetThe offset.
bitOffsetThe bit offset.
valueif set to true [value].

◆ tryRead20WithOffset:bitOffset:value:

- (bool) tryRead20WithOffset: (int)  offset
bitOffset: (int)  bitOffset
value: (int *)  value 

Tries to read a 20-bit value.

Parameters
offsetThe offset.
bitOffsetThe bit offset.
valueThe value.

◆ tryRead21WithOffset:bitOffset:value:

- (bool) tryRead21WithOffset: (int)  offset
bitOffset: (int)  bitOffset
value: (int *)  value 

Tries to read a 21-bit value.

Parameters
offsetThe offset.
bitOffsetThe bit offset.
valueThe value.

◆ tryRead22WithOffset:bitOffset:value:

- (bool) tryRead22WithOffset: (int)  offset
bitOffset: (int)  bitOffset
value: (int *)  value 

Tries to read a 22-bit value.

Parameters
offsetThe offset.
bitOffsetThe bit offset.
valueThe value.

◆ tryRead23WithOffset:bitOffset:value:

- (bool) tryRead23WithOffset: (int)  offset
bitOffset: (int)  bitOffset
value: (int *)  value 

Tries to read a 23-bit value.

Parameters
offsetThe offset.
bitOffsetThe bit offset.
valueThe value.

◆ tryRead24WithOffset:value:

- (bool) tryRead24WithOffset: (int)  offset
value: (int *)  value 

Tries to read a 24-bit value.

Parameters
offsetThe offset.
valueThe value.

◆ tryRead2WithOffset:bitOffset:value:

- (bool) tryRead2WithOffset: (int)  offset
bitOffset: (int)  bitOffset
value: (int *)  value 

Tries to read a 2-bit value.

Parameters
offsetThe offset.
bitOffsetThe bit offset.
valueThe value.

◆ tryRead32WithOffset:value:

- (bool) tryRead32WithOffset: (int)  offset
value: (long long *)  value 

Tries to read a 32-bit value.

Parameters
offsetThe offset.
valueThe value.

◆ tryRead3WithOffset:bitOffset:value:

- (bool) tryRead3WithOffset: (int)  offset
bitOffset: (int)  bitOffset
value: (int *)  value 

Tries to read a 3-bit value.

Parameters
offsetThe offset.
bitOffsetThe bit offset.
valueThe value.

◆ tryRead40WithOffset:value:

- (bool) tryRead40WithOffset: (int)  offset
value: (long long *)  value 

Tries to read a 40-bit value.

Parameters
offsetThe offset.
valueThe value.

◆ tryRead48WithOffset:value:

- (bool) tryRead48WithOffset: (int)  offset
value: (long long *)  value 

Tries to read a 48-bit value.

Parameters
offsetThe offset.
valueThe value.

◆ tryRead4WithOffset:bitOffset:value:

- (bool) tryRead4WithOffset: (int)  offset
bitOffset: (int)  bitOffset
value: (int *)  value 

Tries to read a 4-bit value.

Parameters
offsetThe offset.
bitOffsetThe bit offset.
valueThe value.

◆ tryRead56WithOffset:value:

- (bool) tryRead56WithOffset: (int)  offset
value: (long long *)  value 

Tries to read a 56-bit value.

Parameters
offsetThe offset.
valueThe value.

◆ tryRead5WithOffset:bitOffset:value:

- (bool) tryRead5WithOffset: (int)  offset
bitOffset: (int)  bitOffset
value: (int *)  value 

Tries to read a 5-bit value.

Parameters
offsetThe offset.
bitOffsetThe bit offset.
valueThe value.

◆ tryRead64WithOffset:value:

- (bool) tryRead64WithOffset: (int)  offset
value: (long long *)  value 

Tries to read a 64-bit value.

Parameters
offsetThe offset.
valueThe value.

◆ tryRead6WithOffset:bitOffset:value:

- (bool) tryRead6WithOffset: (int)  offset
bitOffset: (int)  bitOffset
value: (int *)  value 

Tries to read a 6-bit value.

Parameters
offsetThe offset.
bitOffsetThe bit offset.
valueThe value.

◆ tryRead7WithOffset:bitOffset:value:

- (bool) tryRead7WithOffset: (int)  offset
bitOffset: (int)  bitOffset
value: (int *)  value 

Tries to read a 7-bit value.

Parameters
offsetThe offset.
bitOffsetThe bit offset.
valueThe value.

◆ tryRead8WithOffset:value:

- (bool) tryRead8WithOffset: (int)  offset
value: (int *)  value 

Tries to read an 8-bit value.

Parameters
offsetThe offset.
valueThe value.

◆ tryRead9WithOffset:bitOffset:value:

- (bool) tryRead9WithOffset: (int)  offset
bitOffset: (int)  bitOffset
value: (int *)  value 

Tries to read a 9-bit value.

Parameters
offsetThe offset.
bitOffsetThe bit offset.
valueThe value.

◆ wrapWithData:

+ (FMLiveSwitchDataBuffer*) wrapWithData: (NSMutableData *)  data

Produces a new data buffer containing supplied data in big-endian format.

Parameters
dataThe data.

◆ wrapWithData:index:

+ (FMLiveSwitchDataBuffer*) wrapWithData: (NSMutableData *)  data
index: (int)  index 

Produces a new data buffer containing supplied data in big-endian format.

Parameters
dataThe data.
indexThe index.

◆ wrapWithData:index:length:

+ (FMLiveSwitchDataBuffer*) wrapWithData: (NSMutableData *)  data
index: (int)  index
length: (int)  length 

Produces a new data buffer containing supplied data in big-endian format.

Parameters
dataThe data.
indexThe index.
lengthThe length.

◆ wrapWithData:index:length:littleEndian:

+ (FMLiveSwitchDataBuffer*) wrapWithData: (NSMutableData *)  data
index: (int)  index
length: (int)  length
littleEndian: (bool)  littleEndian 

Produces a new data buffer containing supplied data.

Parameters
dataThe data.
indexThe index.
lengthThe length.
littleEndianWhether the data is little-endian.

◆ wrapWithData:index:littleEndian:

+ (FMLiveSwitchDataBuffer*) wrapWithData: (NSMutableData *)  data
index: (int)  index
littleEndian: (bool)  littleEndian 

Produces a new data buffer containing supplied data.

Parameters
dataThe data.
indexThe index.
littleEndianWhether the data is little-endian.

◆ wrapWithData:littleEndian:

+ (FMLiveSwitchDataBuffer*) wrapWithData: (NSMutableData *)  data
littleEndian: (bool)  littleEndian 

Produces a new data buffer containing supplied data.

Parameters
dataThe data.
littleEndianWhether the data is little-endian.

◆ write10:offset:bitOffset:

- (bool) write10: (int)  value
offset: (int)  offset
bitOffset: (int)  bitOffset 

Writes a 10-bit value.

Parameters
valueThe value.
offsetThe offset.
bitOffsetThe bit offset.

◆ write11:offset:bitOffset:

- (bool) write11: (int)  value
offset: (int)  offset
bitOffset: (int)  bitOffset 

Writes an 11-bit value.

Parameters
valueThe value.
offsetThe offset.
bitOffsetThe bit offset.

◆ write12:offset:bitOffset:

- (bool) write12: (int)  value
offset: (int)  offset
bitOffset: (int)  bitOffset 

Writes a 12-bit value.

Parameters
valueThe value.
offsetThe offset.
bitOffsetThe bit offset.

◆ write13:offset:bitOffset:

- (bool) write13: (int)  value
offset: (int)  offset
bitOffset: (int)  bitOffset 

Writes a 13-bit value.

Parameters
valueThe value.
offsetThe offset.
bitOffsetThe bit offset.

◆ write14:offset:bitOffset:

- (bool) write14: (int)  value
offset: (int)  offset
bitOffset: (int)  bitOffset 

Writes a 14-bit value.

Parameters
valueThe value.
offsetThe offset.
bitOffsetThe bit offset.

◆ write15:offset:bitOffset:

- (bool) write15: (int)  value
offset: (int)  offset
bitOffset: (int)  bitOffset 

Writes a 15-bit value.

Parameters
valueThe value.
offsetThe offset.
bitOffsetThe bit offset.

◆ write16:offset:

- (bool) write16: (int)  value
offset: (int)  offset 

Writes a 16-bit value.

Parameters
valueThe value.
offsetThe offset.

◆ write16:offset:offsetPlus:

- (bool) write16: (int)  value
offset: (int)  offset
offsetPlus: (int *)  offsetPlus 

Writes a 16-bit value.

Parameters
valueThe value.
offsetThe offset.
offsetPlusThe offset plus the value length.

◆ write16Signed:offset:

- (bool) write16Signed: (int)  value
offset: (int)  offset 

Writes a signed 16-bit value.

Parameters
valueThe value.
offsetThe offset.

◆ write17:offset:bitOffset:

- (bool) write17: (int)  value
offset: (int)  offset
bitOffset: (int)  bitOffset 

Writes a 17-bit value.

Parameters
valueThe value.
offsetThe offset.
bitOffsetThe bit offset.

◆ write18:offset:bitOffset:

- (bool) write18: (int)  value
offset: (int)  offset
bitOffset: (int)  bitOffset 

Writes an 18-bit value.

Parameters
valueThe value.
offsetThe offset.
bitOffsetThe bit offset.

◆ write19:offset:bitOffset:

- (bool) write19: (int)  value
offset: (int)  offset
bitOffset: (int)  bitOffset 

Writes a 19-bit value.

Parameters
valueThe value.
offsetThe offset.
bitOffsetThe bit offset.

◆ write1:offset:bitOffset:

- (bool) write1: (bool)  value
offset: (int)  offset
bitOffset: (int)  bitOffset 

Writes a 1-bit value.

Parameters
valueThe value.
offsetThe offset.
bitOffsetThe bit offset.

◆ write20:offset:bitOffset:

- (bool) write20: (int)  value
offset: (int)  offset
bitOffset: (int)  bitOffset 

Writes a 20-bit value.

Parameters
valueThe value.
offsetThe offset.
bitOffsetThe bit offset.

◆ write21:offset:bitOffset:

- (bool) write21: (int)  value
offset: (int)  offset
bitOffset: (int)  bitOffset 

Writes a 21-bit value.

Parameters
valueThe value.
offsetThe offset.
bitOffsetThe bit offset.

◆ write22:offset:bitOffset:

- (bool) write22: (int)  value
offset: (int)  offset
bitOffset: (int)  bitOffset 

Writes a 22-bit value.

Parameters
valueThe value.
offsetThe offset.
bitOffsetThe bit offset.

◆ write23:offset:bitOffset:

- (bool) write23: (int)  value
offset: (int)  offset
bitOffset: (int)  bitOffset 

Writes a 23-bit value.

Parameters
valueThe value.
offsetThe offset.
bitOffsetThe bit offset.

◆ write24:offset:

- (bool) write24: (int)  value
offset: (int)  offset 

Writes a 24-bit value.

Parameters
valueThe value.
offsetThe offset.

◆ write24:offset:offsetPlus:

- (bool) write24: (int)  value
offset: (int)  offset
offsetPlus: (int *)  offsetPlus 

Writes a 24-bit value.

Parameters
valueThe value.
offsetThe offset.
offsetPlusThe offset plus the value length.

◆ write2:offset:bitOffset:

- (bool) write2: (int)  value
offset: (int)  offset
bitOffset: (int)  bitOffset 

Writes a 2-bit value.

Parameters
valueThe value.
offsetThe offset.
bitOffsetThe bit offset.

◆ write32:offset:

- (bool) write32: (long long)  value
offset: (int)  offset 

Writes a 32-bit value.

Parameters
valueThe value.
offsetThe offset.

◆ write32:offset:offsetPlus:

- (bool) write32: (long long)  value
offset: (int)  offset
offsetPlus: (int *)  offsetPlus 

Writes a 32-bit value.

Parameters
valueThe value.
offsetThe offset.
offsetPlusThe offset plus the value length.

◆ write3:offset:bitOffset:

- (bool) write3: (int)  value
offset: (int)  offset
bitOffset: (int)  bitOffset 

Writes a 3-bit value.

Parameters
valueThe value.
offsetThe offset.
bitOffsetThe bit offset.

◆ write40:offset:

- (bool) write40: (long long)  value
offset: (int)  offset 

Writes a 40-bit value.

Parameters
valueThe value.
offsetThe offset.

◆ write40:offset:offsetPlus:

- (bool) write40: (long long)  value
offset: (int)  offset
offsetPlus: (int *)  offsetPlus 

Writes a 40-bit value.

Parameters
valueThe value.
offsetThe offset.
offsetPlusThe offset plus the value length.

◆ write48:offset:

- (bool) write48: (long long)  value
offset: (int)  offset 

Writes a 48-bit value.

Parameters
valueThe value.
offsetThe offset.

◆ write48:offset:offsetPlus:

- (bool) write48: (long long)  value
offset: (int)  offset
offsetPlus: (int *)  offsetPlus 

Writes a 48-bit value.

Parameters
valueThe value.
offsetThe offset.
offsetPlusThe offset plus the value length.

◆ write4:offset:bitOffset:

- (bool) write4: (int)  value
offset: (int)  offset
bitOffset: (int)  bitOffset 

Writes a 4-bit value.

Parameters
valueThe value.
offsetThe offset.
bitOffsetThe bit offset.

◆ write56:offset:

- (bool) write56: (long long)  value
offset: (int)  offset 

Writes a 56-bit value.

Parameters
valueThe value.
offsetThe offset.

◆ write56:offset:offsetPlus:

- (bool) write56: (long long)  value
offset: (int)  offset
offsetPlus: (int *)  offsetPlus 

Writes a 56-bit value.

Parameters
valueThe value.
offsetThe offset.
offsetPlusThe offset plus the value length.

◆ write5:offset:bitOffset:

- (bool) write5: (int)  value
offset: (int)  offset
bitOffset: (int)  bitOffset 

Writes a 5-bit value.

Parameters
valueThe value.
offsetThe offset.
bitOffsetThe bit offset.

◆ write64:offset:

- (bool) write64: (long long)  value
offset: (int)  offset 

Writes a 64-bit value.

Parameters
valueThe value.
offsetThe offset.

◆ write64:offset:offsetPlus:

- (bool) write64: (long long)  value
offset: (int)  offset
offsetPlus: (int *)  offsetPlus 

Writes a 64-bit value.

Parameters
valueThe value.
offsetThe offset.
offsetPlusThe offset plus the value length.

◆ write6:offset:bitOffset:

- (bool) write6: (int)  value
offset: (int)  offset
bitOffset: (int)  bitOffset 

Writes a 6-bit value.

Parameters
valueThe value.
offsetThe offset.
bitOffsetThe bit offset.

◆ write7:offset:bitOffset:

- (bool) write7: (int)  value
offset: (int)  offset
bitOffset: (int)  bitOffset 

Writes a 7-bit value.

Parameters
valueThe value.
offsetThe offset.
bitOffsetThe bit offset.

◆ write8:offset:

- (bool) write8: (int)  value
offset: (int)  offset 

Writes an 8-bit value.

Parameters
valueThe value.
offsetThe offset.

◆ write8:offset:offsetPlus:

- (bool) write8: (int)  value
offset: (int)  offset
offsetPlus: (int *)  offsetPlus 

Writes an 8-bit value.

Parameters
valueThe value.
offsetThe offset.
offsetPlusThe offset plus the value length.

◆ write9:offset:bitOffset:

- (bool) write9: (int)  value
offset: (int)  offset
bitOffset: (int)  bitOffset 

Writes a 9-bit value.

Parameters
valueThe value.
offsetThe offset.
bitOffsetThe bit offset.

◆ writeBytes:

- (void) writeBytes: (NSMutableData *)  bytes

Writes a byte array to this instance.

Parameters
bytesThe bytes.

◆ writeBytes:bytesIndex:bytesLength:offset:

- (void) writeBytes: (NSMutableData *)  bytes
bytesIndex: (int)  bytesIndex
bytesLength: (int)  bytesLength
offset: (int)  offset 

Writes a byte array to this instance.

Parameters
bytesThe bytes.
bytesIndexThe bytes index.
bytesLengthThe bytes length.
offsetThe offset.

◆ writeBytes:bytesIndex:bytesLength:offset:offsetPlus:

- (void) writeBytes: (NSMutableData *)  bytes
bytesIndex: (int)  bytesIndex
bytesLength: (int)  bytesLength
offset: (int)  offset
offsetPlus: (int *)  offsetPlus 

Writes a byte array to this instance.

Parameters
bytesThe bytes.
bytesIndexThe bytes index.
bytesLengthThe bytes length.
offsetThe offset.
offsetPlusThe offset plus the buffer length.

◆ writeBytes:bytesIndex:offset:

- (void) writeBytes: (NSMutableData *)  bytes
bytesIndex: (int)  bytesIndex
offset: (int)  offset 

Writes a byte array to this instance.

Parameters
bytesThe bytes.
bytesIndexThe bytes index.
offsetThe offset.

◆ writeBytes:offset:

- (void) writeBytes: (NSMutableData *)  bytes
offset: (int)  offset 

Writes a byte array to this instance.

Parameters
bytesThe bytes.
offsetThe offset.

◆ writeWithBuffer:

- (void) writeWithBuffer: (FMLiveSwitchDataBuffer *)  buffer

Writes a data buffer to this instance.

Parameters
bufferThe buffer.

◆ writeWithBuffer:offset:

- (void) writeWithBuffer: (FMLiveSwitchDataBuffer *)  buffer
offset: (int)  offset 

Writes a data buffer to this instance.

Parameters
bufferThe buffer.
offsetThe offset.

◆ writeWithBuffer:offset:offsetPlus:

- (void) writeWithBuffer: (FMLiveSwitchDataBuffer *)  buffer
offset: (int)  offset
offsetPlus: (int *)  offsetPlus 

Writes a data buffer to this instance.

Parameters
bufferThe buffer.
offsetThe offset.
offsetPlusThe offset plus the buffer length.

◆ xor:offset:

- (bool) xor: (int)  value
offset: (int)  offset 

Performs a bitwise "xor" operation on a value.

Parameters
valueThe value.
offsetThe offset.