We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 59b2f0f commit b0e5c78Copy full SHA for b0e5c78
1 file changed
python3/cobs/cobs/__init__.py
@@ -28,13 +28,13 @@
28
from .._version import *
29
30
31
-def encoding_overhead(source_len: int) -> int:
+def encoding_overhead(source_len):
32
"""Calculates the maximum overhead when encoding a message with the given length.
33
The overhead is a maximum of [n/254] bytes (one in 254 bytes) rounded up."""
34
return (source_len + 254 - 1) // 254
35
36
37
-def max_encoded_length(source_len: int) -> int:
+def max_encoded_length(source_len):
38
"""Calculates how maximum possible size of an encoded message given the length of the
39
source message."""
40
return source_len + encoding_overhead(source_len)
0 commit comments