Skip to content
Chris Petersen edited this page Oct 16, 2014 · 1 revision

u8data-le-u16 return an unsigned little endian 16-bit integer

Parameter Description
v The u8data to be converted

Example

Example 1: Demonstrate u8data conversion functions of different endianness

> (define buf (u8vector->u8data (u8vector 130 220 180 250)))
> (u8data-u16 buf)
33500
> (u8data-le-u16 buf)
56450
> (u8data-s16 buf)
-32036
> (u8data-le-s16 buf)
-9086
> (u8data-u32 buf)
2195502330
> (u8data-le-u32 buf)
4206156930
> (u8data-s32 buf)
-2195502330
> (u8data-le-s32 buf)
-88810366
Clone this wiki locally