Hi all,
Im trying to reduce the file reading memory consumed for a problem.So i wanted to try doing this thing.
I have a text file of 2 million characters. This file when read each time by my code takes max memory. The process to manipulate from those character stored in system as second step doesnt consume so much time.
hence i decided to convert the character text file into binary file so that the system can directly store this binary file and use its information when required.
1.Can anyone please tell me how to take a text file and rewrite it as a binary file.
Once this is done, the binary file is now always used by my code as input data ....for as many executions of the problem.
2. use this binary file and store its information using my code, in a useful array of characters in the system.
I know this seems pointless but do let me know how this is done. and if this idea will reduce the memory
thanks
regards
specy