This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
addons:functions:bits [2017/04/21 20:50] atom0s |
addons:functions:bits [2017/04/22 00:10] (current) |
||
---|---|---|---|
Line 4: | Line 4: | ||
You can access these functions via: | You can access these functions via: | ||
- | <code lua>ashita.bits.</code> | + | <sxh lua>ashita.bits.</sxh> |
---- | ---- | ||
Line 10: | Line 10: | ||
Unpacks bit data. (Big Endian) | Unpacks bit data. (Big Endian) | ||
- | <code lua>number ashita.bits.unpack_be(data, offset, len);</code> | + | <sxh lua>number ashita.bits.unpack_be(data, offset, len);</sxh> |
* **Parameters** | * **Parameters** | ||
* data - (string) The string to unpack data from. | * data - (string) The string to unpack data from. | ||
Line 18: | Line 18: | ||
* number - The unpacked value. | * number - The unpacked value. | ||
- | <code lua>number ashita.bits.unpack_be(data, byteOffset, bitOffset, len);</code> | + | <sxh lua>number ashita.bits.unpack_be(data, byteOffset, bitOffset, len);</sxh> |
* **Parameters** | * **Parameters** | ||
* data - (string) The string to unpack data from. | * data - (string) The string to unpack data from. | ||
Line 31: | Line 31: | ||
Unpacks bit data. (Little Endian) | Unpacks bit data. (Little Endian) | ||
- | <code lua>number ashita.bits.unpack_le(data, offset, len);</code> | + | <sxh lua>number ashita.bits.unpack_le(data, offset, len);</sxh> |
* **Parameters** | * **Parameters** | ||
* data - (string) The string to unpack data from. | * data - (string) The string to unpack data from. | ||
Line 39: | Line 39: | ||
* number - The unpacked value. | * number - The unpacked value. | ||
- | <code lua>number ashita.bits.unpack_le(data, byteOffset, bitOffset, len);</code> | + | <sxh lua>number ashita.bits.unpack_le(data, byteOffset, bitOffset, len);</sxh> |
* **Parameters** | * **Parameters** | ||
* data - (string) The string to unpack data from. | * data - (string) The string to unpack data from. |