PostGIS  2.2.7dev-r@@SVN_REVISION@@
uint32_t zigzag32 ( int32_t  val)

Definition at line 167 of file varint.c.

Referenced by test_zigzag(), and varint_s32_encode_buf().

168 {
169  return val >= 0 ?
170  ((uint32_t)val) << 1 :
171  ((((uint32_t)(-1 - val)) << 1) | 0x01);
172 }

Here is the caller graph for this function: