ivar stands for signed variable-sized integer
it's similar to uvar (see encode_uvar), except that in the first byte, the second-major bit Z of the octet (0b0ZYYYYYY), signals whether the number is positive (Z == 0), or negative (Z == 1)
the following table lists the first few bounds of this encoding:

decimal signed big endian binary signed variable binary
0 0b00000000 0b00000000 0b00000000 0b00000000 0b00000000 or 0b01000000
63 = 2^6 - 1 0b00000000 0b00000000 0b00000000 0b00111111 0b00111111
-63 = -(2^6 - 1) 0b00000000 0b00000000 0b00000000 0b11000001 0b01111111
8191 = 2^13 - 1 0b00000000 0b00000000 0b00011111 0b11111111 0b10111111 0b01111111
-8191 = -(2^13 - 1) 0b00000000 0b00000000 0b11100000 0b00000001 0b11111111 0b01111111