UtilsLib Xojo plugin

EinhugurBitwiseModule.CompareBits Method (console safe)

Use this method to compare a block of bits from one MemoryBlock to another.

CompareBits(
   byteOffsetA as Integer,
   bitOffsetA as Integer,
   blockB as MemoryBlock,
   byteOffsetB as Integer,
   bitOffsetB as Integer,
   bitCount as Integer) as Boolean

Parameters

byteOffsetA
This parameter can be used to specify byte offset the first MemoryBlock.
bitOffsetA
This parameter can be used to specify bit offset the first MemoryBlock.
blockB
The MemoryBlock to compare to.
byteOffsetB
This parameter can be used to specify byte offset the second MemoryBlock.
bitOffsetB
This parameter can be used to specify bit offset the second MemoryBlock.
bitCount
The count of bits to compare.

Returns

Boolean

Remarks

Returns: True if the bits were equal.

This method is not bounds checked in any way. You are responsible for making sure you don't go out of bounds.

Note that this is bitwise compare, not byte wise and is because of that not very efficient. You can for example compare 5 bits.

This method is extension method for MemoryBlocks and is available by adding a MemoryBlock parameter in front of other parameters.

Supported Platforms:

  • MacOS X Cocoa 32 bit
  • MacOS X Cocoa 64 bit
  • Windows 32 bit
  • Windows 64 bit
  • Linux 32 bit
  • Linux 64 bit
  • Linux ARM

    Unsupported Platforms:

  • MacOS X Carbon

    See Also

    EinhugurBitwiseModule Module