The alt code should (though untested) work in Windows which distinguishes between text and binary. It uses the Windows functions _fileno() and _setmode() to set binary mode on stdout. The README.md file has been format/typo checked.