Constructing the encoder

A basic encoder can be modeled simply as a quantizer using the quantize block with the resolution set to 0.4.