Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions kafka/benchmarks/varint_speed.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def encode_varint_1(num):
if num == 0:
break
else:
# Max size of endcoded double is 10 bytes for unsigned values
# Max size of encoded double is 10 bytes for unsigned values
raise ValueError("Out of double range")
return buf[:i + 1]

Expand Down Expand Up @@ -314,7 +314,7 @@ def decode_varint_1(buffer, pos=0):
value |= byte << shift
break
else:
# Max size of endcoded double is 10 bytes for unsigned values
# Max size of encoded double is 10 bytes for unsigned values
raise ValueError("Out of double range")
# Normalize sign
return (value >> 1) ^ -(value & 1), i + 1
Expand Down