User Tools

Site Tools

Command disabled: resendpwd

addons:functions:bits

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);

  • 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_le(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.
addons/functions/bits.txt · Last modified: 2017/04/22 00:10 (external edit)