[comp.lang.c] Binary vs. text files

rang@cs.wisc.edu (Anton Rang) (10/21/90)

In article <1990Oct20.003222.25439@athena.mit.edu> scs@adam.mit.edu (Steve Summit) writes:
>My $64,000 question is: why are so many poor souls condemned to
>try to read and write binary data files?

  My $0.02 answer is: Using a binary (or other fixed-length) format
makes random access easy; and allocating records large enough to
handle the largest textual representation of the data may be
impractical.  (OK, so you could do the equivalent of uuencode on the
data and it wouldn't blow up too much.)

  For sequential files where space and speed aren't issues, text
formats are great; otherwise, a binary format is probably good.

  All IMHO, of course.

	Anton
   
+---------------------------+------------------+-------------+
| Anton Rang (grad student) | rang@cs.wisc.edu | UW--Madison |
+---------------------------+------------------+-------------+