PostGIS  3.4.0dev-r@@SVN_REVISION@@

◆ varint_size()

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

Definition at line 148 of file varint.c.

149 {
150  const uint8_t *ptr = the_start;
151 
152  /* Check so we don't read beyond the twkb */
153  while( ptr < the_end )
154  {
155  /* Hibit is set, this isn't the last byte */
156  if (*ptr & 0x80)
157  {
158  ptr++;
159  }
160  else
161  {
162  ptr++;
163  return ptr - the_start;
164  }
165  }
166  return 0;
167 }

Referenced by twkb_parse_state_varint_skip().

Here is the caller graph for this function: