Added public encode and decode methods
Merge pull request #28 from trygve-lie/public_encode_decode

Added public encode and decode methods