PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ read_uint32()

uint32_t read_uint32 ( const uint8_t **  from,
uint8_t  littleEndian 
)

Definition at line 287 of file rt_serialize.c.

Referenced by read_float32(), read_int32(), rt_band_from_wkb(), and rt_raster_deserialize().

287  {
288  uint32_t ret = 0;
289 
290  assert(NULL != from);
291 
292  if (littleEndian) {
293  ret = (uint32_t) ((*from)[0] & 0xff) |
294  (uint32_t) ((*from)[1] & 0xff) << 8 |
295  (uint32_t) ((*from)[2] & 0xff) << 16 |
296  (uint32_t) ((*from)[3] & 0xff) << 24;
297  } else {
298  /* big endian */
299  ret = (uint32_t) ((*from)[3] & 0xff) |
300  (uint32_t) ((*from)[2] & 0xff) << 8 |
301  (uint32_t) ((*from)[1] & 0xff) << 16 |
302  (uint32_t) ((*from)[0] & 0xff) << 24;
303  }
304 
305  *from += 4;
306  return ret;
307 }
unsigned int uint32_t
Definition: uthash.h:78
Here is the caller graph for this function: