User Tools

Site Tools


addons:functions:bits

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
addons:functions:bits [2017/04/21 20:48]
atom0s created
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> 
-<code lua>​number ashita.bits.unpack_le(data,​ byteOffset, bitOffset, len);</code>+  * **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. 
 + 
 +<sxh lua>​number ashita.bits.unpack_le(data,​ byteOffset, bitOffset, len);</sxh> 
 +  * **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.1492832929.txt.gz · Last modified: 2017/04/21 20:48 by atom0s