encode+detector