Encoder framework