Encode single values