utils/binary/binary_operation
library
Functions
-
add32(int x, int y)
→ int
-
Adds two 32-bit integers and applies a mask to ensure the result fits within 32 bits.
-
readUint16BE(List<int> data, [int offset = 0])
→ int
-
Reads a 16-bit unsigned integer value in big-endian byte order from a list.
-
readUint16LE(List<int> array, [int offset = 0])
→ int
-
Reads a 16-bit unsigned integer value in little-endian byte order from a list.
-
readUint32BE(List<int> array, [int offset = 0])
→ int
-
Reads a 32-bit unsigned integer value in big-endian byte order from a list.
-
readUint32LE(List<int> array, [int offset = 0])
→ int
-
Reads a 32-bit unsigned integer value in little-endian byte order from a list.
-
readUint8(List<int> array, [int offset = 0])
→ int
-
Reads an 8-bit unsigned integer value from a list.
-
rotl32(int val, int shift)
→ int
-
Rotates a 32-bit integer left by a specified number of bits.
-
rotr32(int val, int shift)
→ int
-
Rotates a 32-bit integer right by a specified number of bits.
-
shr16(int x)
→ int
-
Right-shifts a 32-bit integer by 16 bits and applies a mask to ensure the result fits within 16 bits.
-
writeUint16BE(int value, List<int> out, [int offset = 0])
→ void
-
Writes a 16-bit unsigned integer value in big-endian byte order to a list.
-
writeUint16LE(int value, List<int> out, [int offset = 0])
→ void
-
Writes a 16-bit unsigned integer value in little-endian byte order to a list.
-
writeUint32BE(int value, List<int> out, [int offset = 0])
→ void
-
Writes a 32-bit unsigned integer value in big-endian byte order to a list.
-
writeUint32LE(int value, List<int> out, [int offset = 0])
→ void
-
Writes a 32-bit unsigned integer value in little-endian byte order to a list.
-
writeUint64LE(int value, [List<int>? out, int offset = 0])
→ List<int>
-
Writes a 64-bit unsigned integer value in little-endian byte order to a list.
-
zero(List<int> array)
→ void
-
Sets all elements in a list to zero.