Skip to content
Open
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
6 changes: 6 additions & 0 deletions erlastic/codec.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@ def decode_h(self, bytes, offset):
items.append(val)
return tuple(items), offset

def decode_p(self, bytes, offset = 0):
"""Decode NEW_FUN_EXT"""
size = struct.unpack(">L", bytes[offset:offset+4])[0]
arity = ord(bytes[4])
return "f/%d"%(arity), offset+size

def decode_i(self, bytes, offset):
"""LARGE_TUPLE_EXT"""
arity = struct.unpack(">L", bytes[offset:offset+4])[0]
Expand Down