encode service