Improvements to zmq codec and another example