1. The data file does not contain encoding info, so there is no such a thing called "Loosing the encoding info".
2. Virtual memory is managed by OS, you are not supposed to touch it.
3. Set the buffer lower, bufferred stream will load the data from the file system to memory buffer automatically. 10M buffer is enough for a 400M file.
4. Paste you code here so that we can know what you are doing exactly....
// --- Write a 400M file containing one big5 character 陸 ---
StreamWriter bigWriter = new StreamWriter(@"big5.txt", false, Encoding.GetEncoding("big5"));
for (int i = 0; i < 209715200; i++) bigWriter.Write("陸");
bigWriter.Close();
Console.WriteLine("Writing Done");
// --- Read big5 characters from the 400M file ---
StreamReader bigReader = new StreamReader(@"big5.txt", Encoding.GetEncoding("big5"));
// - print out the first big character -
char[] chars = new char[1];
bigReader.Read(chars, 0, 1);
Console.WriteLine(chars);
// - Read the rest and print the total number of characters read -
int counter = 1;
while (-1 != bigReader.Read()) counter++;
bigReader.Close();
Console.WriteLine("Reading Done: " + counter);