PostGIS 3.7.0dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ read_uint32()

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

Definition at line 288 of file rt_serialize.c.

288 {
289 uint32_t ret = 0;
290
291 assert(NULL != from);
292
293 if (littleEndian) {
294 ret = (uint32_t) ((*from)[0] & 0xff) |
295 (uint32_t) ((*from)[1] & 0xff) << 8 |
296 (uint32_t) ((*from)[2] & 0xff) << 16 |
297 (uint32_t) ((*from)[3] & 0xff) << 24;
298 } else {
299 /* big endian */
300 ret = (uint32_t) ((*from)[3] & 0xff) |
301 (uint32_t) ((*from)[2] & 0xff) << 8 |
302 (uint32_t) ((*from)[1] & 0xff) << 16 |
303 (uint32_t) ((*from)[0] & 0xff) << 24;
304 }
305
306 *from += 4;
307 return ret;
308}

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

Here is the caller graph for this function: