I am writing a program to read and write a specific binary file format.
I believe I have it 95% working. I am running into a a strange problem.
In the screenshot I am showing a program I wrote that compares two files byte by byte. The very last byte should be 0 but is FFFFFFF.
Using a binary viewer I can see no difference in the files. They appear to be identical.
Also, windows tells me the size of the files is different but the size on disk is the same.
Can someone help me understand what is going on?

The original is on the left and my copy is on the right.
Possible answers:
You forgot to call
Stream.close()orStream.Dispose().Your code is messing up text and and other kinds of data (e.g. casting a
-1from aRead()method into achar, then writing it.We need to see your code though…