encode/decode protocol buffers in node with stream support