I'm building a little file compression system that is supposed to allow grouping a hierarchy of multiple files and then compressing them and the contrary.
For this I don't take care of the file type to keep it generic but I'm getting a problem when the file is an XML file. Actually when I copy an XML file contents into a binary stream it seems to always add 3 bytse at the beginning and I don't know what they're supposed to mean. I wouldn't have gone deeper into this if the XmlTextReader class wouldn't care about it...but it does and crashes telling me it can't find the root element. So for the moment I have to manually check the file to see if it's an xml file or not and remove the three first bytes if it is which is really bad coding...
So if anyone has an idea about this it would really help me. Thanks in advance.
PS: so far I always got the same bytes which are the following characters: ï»¿. They show up before every xml file I put into the binary stream.