With UTF-16 we should probably decide on that just by looking for a BOM, but aside from that I believe reading 8k is not a problem, we'd need to allocate this buffer to 8k right away in
any case to get good performance. For almost all files we have
to check the first 8k bytes because nul-bytes are very rare and those with mostly-binary repos probably have autocrlf set to false anyway.