refactor supported formats and codecs

frosenset() -> Enum