mediary file construction and concatenation working perfectly. we can now encode arbitrarily long text files