You should be able to effortlessly open GB sized files in a
FileReader object, with the caveat that the following approach is not the best performing. Then in a loop you would read blocks of say 5MB into memory, process these and push these to a webserver (ideally at localhost/127.0.0.1) You could use a simple php script for that (name it
index.php). Something like:
<?php file_put_contents("outfile".date().".tsv", implode('', $_POST); , FILE_APPEND); ?>
You should probably do some filtering on the
$_POSTvariable first, and put a PHP_Session ID into the filename.
Through another short php/some-language script you could offer the user to compress said output-file and let the user download it. The script checks if the archive already exists, and if not inform the user to try again later.
You should do the POSTing of the processed content through AJAX calls. If you do not want to use a comprehensive library such as jQuery for that purpose consider using is-lib's