Add encoding snippet