add encode, decode; fix inspect_packet
fixed so readme.sh tests pass