If you're going to continue this approach, I would suggest ditching the stream io and using mmap() with memmove()/memcpy(). Block io will be faster than character io for this.
/* PLUG: http://plug.org, #utah on irc.freenode.net Unsubscribe: http://plug.org/mailman/options/plug Don't fear the penguin. */
