Skip to content
Merged
Show file tree
Hide file tree
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
214 changes: 0 additions & 214 deletions kafka/protocol/message.py

This file was deleted.

12 changes: 0 additions & 12 deletions kafka/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,6 @@
from kafka.errors import KafkaTimeoutError


MAX_INT = 2 ** 31
TO_SIGNED = 2 ** 32

def crc32(data):
crc = binascii.crc32(data)
# CRC is encoded as a signed int in kafka protocol
# so we'll convert the unsigned result to signed
if crc >= MAX_INT:
crc -= TO_SIGNED
return crc


class Timer:
__slots__ = ('_start_at', '_expire_at', '_timeout_ms', '_error_message')

Expand Down
Loading
Loading