Add `enum` codec

I've found this handy. Might be worth including.