On Mon, 24 Apr 1995, Jeremy Elson wrote: > -They take up less space (1K per player vs. 4K per player, or whatever the > min blocksize of your filesystem is.) I found that less than 25% of players > have rentfiles in practice, so a binary file saved space. Actually, except for storing numbers in machine format, using ASCII will require LESS space (assuming you'd be doing one item per line, rather than splitting things into separate fields). With binary files, if you have a data field that's 100 bytes (exaggerated to make the point) for the player's name, and their name is 'Bob', you're wasting over 90 bytes. With the ASCII file, it'd just be 'Bob\n'. And numeric values would range from 2 to however many digits are required. If you know you're going to have really large numbers, you could always write them out in hex first, but that probably wouldn't be worth the trouble. > -They're faster. Not much. I'd reckon everyone uses a cache, so it stills reads/writes gobs of the file before/after the program gets to play with it. > The advantages of ASCII files should be obvious to anyone: they're easier > to use. Agreed. Plus, everyone will have the tools available to screw around with the files (text editors) so that saves some work. These are, of course, just my opinions... - Mark markd@eskimo.com
This archive was generated by hypermail 2b30 : 12/07/00 PST