Determine UTF type based on a sequence of bytes
static UtfType fromBom(List<int> buffer) { return _bomMap.keys .firstWhere((x) => buffer.startsWith(_bomMap[x]!), orElse: () => none); }