It’s the Calculator app on mac in programmer mode:
You’re absolutely right! It’s 257. I was a bit confused as well, because the length of Value (Partition Record) is apparently 65 (= 1 + 16 x 4):
Turns out that VARINT in Kafka involves two additional considerations:
000 0010 + 000 0001 reverses order due to endianness:
000 0001 + 000 0010
= 1 000 0010 = 130
130 becomes 130 / 2 = 65 due to zig-zag encoding.

