Method: Cosmos::Crc#bit_reverse_32
- Defined in:
- lib/cosmos/utilities/crc.rb
#bit_reverse_32(value) ⇒ Object
119 120 121 122 123 124 |
# File 'lib/cosmos/utilities/crc.rb', line 119 def bit_reverse_32(value) (BIT_REVERSE_TABLE[value & 0xFF] << 24) | (BIT_REVERSE_TABLE[(value >> 8) & 0xFF] << 16) | (BIT_REVERSE_TABLE[(value >> 16) & 0xFF] << 8) | (BIT_REVERSE_TABLE[(value >> 24) & 0xFF]) end |