adem0x, what exactly are you trying to rewrite? (because it should already work as is)
Well, it uses shortstrings. And, as was the rage at the time, it sets string length by manipulating the zeroth byte. That means, it doesn't compile with recent versions of Delphi.
The other issue is, naturally, since shortstrings can only have 255 chars, input files with longer lines do not work.
Finally, the code as it stands is far too convoluted spaghetti code. I want to make it readable so that it can be improved.
To that end, I want also to get rid of System.Textfile stuff in favor of TSreams.