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

u8vector->u32 converts a u8vector to an 16bit unsigned integer. The conversion is big endian.

Parameter Description
v Input u8vector
ofs Optional: Start position offset

Example

Example 1: Show some unsigned u8vector to number conversions

> (define v (u8vector 128 129 128 129 128 129 128 129 128 129 128 129))
> (u8vector->u16 v)
32897
> (u8vector->u24 v)
8421760
> (u8vector->u32 v)
2155970689
> (u8vector->u48 v)
141293695107201
> (u8vector->u64 v)
9259823602545557633
> (u8vector->u96 v)
39770639539662072385974141057
Clone this wiki locally