PostGIS  2.2.8dev-r@@SVN_REVISION@@

◆ zigzag64()

uint64_t zigzag64 ( int64_t  val)

Definition at line 160 of file varint.c.

Referenced by test_zigzag(), and varint_s64_encode_buf().

161 {
162  return val >= 0 ?
163  ((uint64_t)val) << 1 :
164  ((((uint64_t)(-1 - val)) << 1) | 0x01);
165 }
Here is the caller graph for this function: