I tried to open a file, read line after line, and after each line I wrote it in an output file (passing line content to a string and then to the output file)...
The results are strange... With ascii file, the content is the same but the file size isn't... and with files like mpeg, avi, zip, etc. the size and the content are different. i tried different type of encoding, but no result...
Could someone help me about this...
I want to use this kind of code to encrypt a file, encrypting it line after line...
Public Sub readWrite()
dim LineBuffer as string
Dim oFileStream As Stream = File.Open(FilePath, FileMode.Open, FileAccess.Read)
Dim oStreamReader As New StreamReader(oFileStream)
Dim oOutputStream As Stream = File.Open(OutPutFile,
Dim oStreamWriter As New StreamWriter(oOutputStream)
LineBuffer = oStreamReader.ReadLine
Loop Until oStreamReader.Peek() = -1
End Sub ReadWrite