Update documentation.
Added an encode and decode function.