31 if (arguments.use_filesize_dependent_cutoff)
33 cutoff_kind = cutoff_kinds::filesize_dependent;
37 cutoff_kind = cutoff_kinds::fixed;
45 case cutoff_kinds::filesize_dependent:
46 return impl(filename);
49 assert(cutoff_kind == cutoff_kinds::fixed);
58 return extension ==
".gz" || extension ==
".bgzf" || extension ==
".bz2";
62 enum class cutoff_kinds
68 cutoff_kinds cutoff_kind{cutoff_kinds::fixed};
70 uint8_t fixed_cutoff{};
85 bool const is_compressed = file_is_compressed(filename);
86 bool const is_fasta = check_for_fasta_format(filename);
94 for (
size_t i = 0; i < cutoff_bounds.
size(); ++i)
96 if (filesize <= cutoff_bounds[i])
114 size_t const suffix_length{suffix.size()};
115 size_t const str_length{str.
size()};
116 return suffix_length > str_length ? false
119 [](
char const chr1,
char const chr2)
121 return std::tolower(chr1) == std::tolower(chr2);
125 auto case_insensitive_ends_with = [&](
std::string const & ext)
127 return case_insensitive_string_ends_with(extension, ext);
130 return std::ranges::find_if(valid_extensions, case_insensitive_ends_with) != valid_extensions.end();