Can `decode_str(no_end_slash(x))`  be also `x.rstrip("/").decode('utf8')`.
I'm thinkin about same length, no supplementary lambda's needed and std libs.