WIP: completed PDU encoder/decoder