int nameToCode(String name) { final info = getByName(name); if (info == null) { throw ArgumentError('Codec not found: $name'); } return info.code; }