Base implementations for encoder functionality.