add encode/decode example to README