Search code examples
c#databaseindexingencodebinaryfiles

How to read dat & idx file with C#?


I have a dictionary data XML file (dict.xml) encoded into dict.dat & dict.idx.

I want to read 2 files with C#. Of coure, we cannot read normal text file with StreamReader because the contents look like this:

€iêá!3n?ùq-ú4u)>ÿû43_fËðŸñÕrj©8EX7?s‹¹YÝO.Ðïá«íõúZþªæQª­¢ãèøè9ößôt'õìŽ6

Is there any way to do that?


Solution

  • Your file is encrypted with a key string.

    You need to specify a key to decrypt dat file.

    Besides, it also has indexing so you can read data faster with idx file.