Added functionality to read_enum in Decoder