PostGIS  2.2.8dev-r@@SVN_REVISION@@

◆ varint_size()

size_t varint_size ( const uint8_t *  the_start,
const uint8_t *  the_end 
)

Definition at line 139 of file varint.c.

Referenced by twkb_parse_state_varint_skip().

140 {
141  const uint8_t *ptr = the_start;
142 
143  /* Check so we don't read beyond the twkb */
144  while( ptr < the_end )
145  {
146  /* Hibit is set, this isn't the last byte */
147  if (*ptr & 0x80)
148  {
149  ptr++;
150  }
151  else
152  {
153  ptr++;
154  return ptr - the_start;
155  }
156  }
157  return 0;
158 }
Here is the caller graph for this function: