How can I decode payloads?

How can I decode payloads?
I would like to know how encode and decode works and how to do it.
The reason why I ask is that I know there is a decoder extension, but not all payloads are decoded.