buffer reads from stdin until we've got enough to make it worth writing to disk