encoding snippet.