Michael,
It's probably a good idea to send questions like this to the Poly/ML
mailing list and I'm copying this reply to the list. There are people
on the list who may have experience of what you're trying to do and also
any replies get archived and reduce the chances of the same question
being asked repeatedly.
To reply to your specific question: there's no difference in efficiency
between TextIO and BinIO on Unix. On Windows TextIO is more complicated
because of the need to convert between CRLF and "\n". I'm not clear how
you are accessing the file, whether it is random or sequential. To read
individual bytes you can always use BinIO.input1 or TextIO.input1. This
would save you having to explode a vector.
BinIO deals with values of type Word8.word and the vector is
Word8Vector.vector. These are unsigned byte values.
Regards,
David
On 16/10/2012 20:59, Michael Moeller wrote:
Hi,
I've got a problem regarding huge files as input. I need to get access to
the single byteslike with fgetc() in C. TextIO and subsequently exploding
the string does the jobbut performance matters and it seems to me like
BinIOsaves me from the 'explode' step.Unfortunately I can't figure out
how to access theresulting BinIO.vector. I'd be appreciative to seean
exampleand please tell me if this is not the right approach.
Regards,
Michael
_______________________________________________
polyml mailing list
[email protected]
http://lists.inf.ed.ac.uk/mailman/listinfo/polyml