Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
ezeio2:scriptref:bufdec [2019-09-02 20:52] – andreh | ezeio2:scriptref:bufdec [2023-08-18 23:50] (current) – andreh | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ==== BufDec( buf[], offset, method ) ==== | + | ==== BufDec ==== |
Decode a part of a buffer into a scalar | Decode a part of a buffer into a scalar | ||
Line 25: | Line 25: | ||
^ BT_INT32LE | 32 bit | signed integer | Little endian integer | | ^ BT_INT32LE | 32 bit | signed integer | Little endian integer | | ||
^ BT_UINT32LE | 32 bit | unsigned integer | Little endian integer | | ^ BT_UINT32LE | 32 bit | unsigned integer | Little endian integer | | ||
+ | ^ BT_INT32BLE | 32 bit | signed integer | Big-Little endian integer | | ||
+ | ^ BT_UINT32BLE | 32 bit | unsigned integer | Big-Little endian integer | | ||
+ | ^ BT_INT32LBE | 32 bit | signed integer | Little-Big endian integer | | ||
+ | ^ BT_UINT32LBE | 32 bit | unsigned integer | Little-Bit endian integer | | ||
^ BT_FLOAT | 32 bit | float | IEEE 732 floating point | | ^ BT_FLOAT | 32 bit | float | IEEE 732 floating point | | ||
+ | ^ BT_FLOATLE | 32 bit | float | IEEE 732 floating point little endian | | ||
+ | ^ BT_FLOAT64 | 64 bit | float64 | IEEE 732 64-bit floating point (converts to 32 bit float) | | ||
+ | ^ BT_FLOAT64LE | 64 bit | float64 | IEEE 732 64-bit floating point little endian (converts to 32 bit float) | | ||
Also available for decoding bitmaps: | Also available for decoding bitmaps: | ||
Line 39: | Line 46: | ||
Returns the decoded value | Returns the decoded value | ||
+ | |||
+ | Note that the returned value is always a 32 bit cell (signed 32 bit integer or 32 bit float). | ||
=== Example usage === | === Example usage === |