Extract encoding functionality.