Random encoder

A prototype of Jeff's Random Distributed Encoder idea per issue #513