Add encoding package with simpler implementation.