Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-developers-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin-developers AT sourceware DOT cygnus DOT com Date: Mon, 24 Apr 2000 15:34:10 -0400 Message-Id: <200004241934.PAA06421@envy.delorie.com> From: DJ Delorie To: cygwin-developers AT sourceware DOT cygnus DOT com In-reply-to: <20000424150424.A1421@cygnus.com> (message from Chris Faylor on Mon, 24 Apr 2000 15:04:24 -0400) Subject: Re: hybrid text/binary mount References: <200004241831 DOT OAA05979 AT envy DOT delorie DOT com> <20000424150424 DOT A1421 AT cygnus DOT com> > I was thinking that if a file had any characters whose ASCII code was > < ' ' or >= DEL before the first \n, then the file would be considered > binary. Otherwise, the file would be text. You could apply this heuristic > to both input and output. It's hard to apply it to output, because you don't know what the program is going to write out. At least on input, you can read a big chunk (buffering does this anyway) and run some tests on the existing data. InfoZip has an automatic converter; we should see what heuristics it uses, since it has a lot more history than we do.