Consider a problem:
- split file by lines
- write lines to a result file
- if a result file exceeds some size create a new result file
For example, if I have a file which weights 4gb and split size is equal 1gb. The result is four files weights 1gb.
I'm looking for a solution with something like Rx*/Bacon or any other similar library in any language.
My solution in Coffee with Highland.js:
walmart.dump
is a text file which contains 6gb of text. Splitting for 649 files takes: