refactored step 3 output to be in left-to-right order, refactored step 4 to take input in left-to-right order
refactored preprocessing output to use streams for sequential output
refactored steps 2/7 to take sequential input as a stream
refactored step 2/7 to return sequential output to a stream
refactored steps 3/8 to take sequential input as a stream
refactored step 3/8 to return output to a stream
refactored step 4 to read sequential input from a stream
refactored step 4 to return sequential output in a stream
refactored step 5 to be a bit more efficient
refactored step 6a to read sequential input from stream
refactored step 6a to return sequential output as a stream
refactored step 6b to take sequential inputs as streams
implemented semi-external BWT
removed useless lines from steps 2&7 and 3&8