User Tools

Site Tools


addons:functions:bits

This is an old revision of the document!


Bits Namespace

The bits namespace contains functions that interact with bits and bytes data.

You can access these functions via:

ashita.bits.

ashita.bits.unpack_be

Unpacks bit data. (Big Endian)

number ashita.bits.unpack_be(data, offset, len);
  • Parameters
    • data - (string) The string to unpack data from.
    • offset - (number) The offset of the data to unpack.
    • len - (number) The length of the data to unpack.
  • Returns
    • number - The unpacked value.
number ashita.bits.unpack_be(data, byteOffset, bitOffset, len);
  • Parameters
    • data - (string) The string to unpack data from.
    • byteOffset - (number) The byte offset of the data to unpack.
    • bitOffset - (number) The bit offset of the data to unpack.
    • len - (number) The length of the data to unpack.
  • Returns
    • number - The unpacked value.

ashita.bits.unpack_le

Unpacks bit data. (Little Endian)

number ashita.bits.unpack_le(data, offset, len);
number ashita.bits.unpack_le(data, byteOffset, bitOffset, len);
addons/functions/bits.1492832929.txt.gz · Last modified: 2017/04/21 20:48 by atom0s