Cakkie
August 30th, 2001, 01:06 AM
I have this program that does some encoding. The program needs about 20 seconds to encode a file about 8 megs.
Of those 20 seconds, it takes about 3 seconds to encode the file. The remaining time is used by the reading of the file.
What I was wondering is that if there is a faster way to read the data. I'm reading the data into a string, that I then convert to a bytearray.
This is the code I use to do that
Open "somefile" for binary access read as #ffile
strInput = input(FileLen("somefile"),#ffile)
arrInput = StrConv(strInput,vbFromUnicode)
Tom Cannaerts
slisse@planetinternet.be
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook
Of those 20 seconds, it takes about 3 seconds to encode the file. The remaining time is used by the reading of the file.
What I was wondering is that if there is a faster way to read the data. I'm reading the data into a string, that I then convert to a bytearray.
This is the code I use to do that
Open "somefile" for binary access read as #ffile
strInput = input(FileLen("somefile"),#ffile)
arrInput = StrConv(strInput,vbFromUnicode)
Tom Cannaerts
slisse@planetinternet.be
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook