	*********
	GRANULATE
	*********

Usage: granulate seg_size in_file outfile_prefix

Granulate is a program for splitting files in place.  The program serves a 
purpose similar to the standard UNIX split, but differs in one important way.
For split to operate on a 40MB file, you must have more than 40MB of free 
space on the disk.  On the other hand, granulate only needs one chunk of free
space on the hard drive, where a chunk is the requested size for the output
files. 

EXAMPLE:
	You want to to split a 500MB file an put it on 100MB zip disks.
	You have only 65MB free on your hard disk.
	Split can't do it.
	Granulate will do it like this:
		granulate 10000000 <input_file> <outfile_prefix>
	You will end up with 50 files, all 10MB. (approximately)
	Reassembly works the same as for regular UNIX split.

NOTE: There is overhead associated with each file on a filesystem.  For
example, storing 2000 files of size one byte requires much more disk space
than storing one file of 2000 bytes.  This means that making seg_size
smaller than a few KB is probably counterproductive.

TODO:
	Perhaps it would be nice to make the maximum disk usage be the same
as the size of the input file (plus fs overhead).  This could be done by
copying the segment to RAM, then truncating in_file, then writing to
out_file.  This might not work well on machines with little RAM, but
seems like a worthwhile option, at least.

	The syntax and semantics should more closely resemble GNU split.

	Granulate could help the user plan how to split the file by optimizing
seg_size with respect to filesystem overhead and rigid user constraints.

	Maybe the functionality of granulate should be merged into the standard
GNU textutils distribution of split.  Maybe it should be a patch against
GNU split.  In any case, the way GNU split was written does not lend
itself to the type of operations that granulate does.  It might be a
really ugly hack. 

BUGS: Please tell me about bugs so I can fix them.

AUTHOR: Kurt Rosenfeld
		hardware@cyberspace.org
