encoder.js :: implement encodePid
test :: add test to encode & decode a pid
encoder.js :: implement encodeRef() and test