feat: compress payloads if flag is set
works fine with libtw2 but TeeAI is stuck in a inf loop
This commit is contained in:
parent
941249f5a3
commit
e27e5aef67
|
@ -287,7 +287,7 @@ max-attributes=7
|
|||
max-bool-expr=5
|
||||
|
||||
# Maximum number of branch for function / method body.
|
||||
max-branches=12
|
||||
max-branches=14
|
||||
|
||||
# Maximum number of locals for function / method body.
|
||||
max-locals=15
|
||||
|
|
|
@ -247,6 +247,8 @@ class TwPacket(PrettyPrint):
|
|||
if is_connless:
|
||||
if self.header.flags.connless is None:
|
||||
self.header.flags.connless = True
|
||||
if self.header.flags.compression:
|
||||
payload = twnet_parser.huffman.compress(payload)
|
||||
return self.header.pack() + payload
|
||||
|
||||
class PacketHeaderParser6():
|
||||
|
|
Loading…
Reference in a new issue