PostGIS  2.2.7dev-r@@SVN_REVISION@@
uint8_t zigzag8 ( int8_t  val)

Definition at line 174 of file varint.c.

Referenced by lwgeom_write_to_buffer(), and test_zigzag().

175 {
176  return val >= 0 ?
177  ((uint8_t)val) << 1 :
178  ((((uint8_t)(-1 - val)) << 1) | 0x01);
179 }

Here is the caller graph for this function: