• 0

Reading and parsing strange files


Question

I know there are apps that already can open NK2 files.  However, i would like to create my own for learning purposes but I don't even know where to start on reading an NK2/Stream_Autocomplete file.  I opened it with a text editor (notepad++) and unreadable.  Then I used a hex editor (HxD) and that was better.

 

If I were to use something like C++ or C#, how would I read the hex in?  I have learned enough to work with ASCII but not anything else.  I need more of a point in the right directions.  Does MS have a file definition on this type of file to follow?

 

Sorry to blabber, just trying to find answers.

 

Thank you

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

From a quick google search it appears that this file format is undocumented, but at least some effort was made to reverse-engineer it here: https://code.google.com/p/debunk2/wiki/fileformat .

 

If you can somehow figure out the format, from C# it's just a matter of opening a BinaryReader on the file and calling the Read***() methods in the appropriate order to match the format. Another approach would be to map the file to unmanaged memory, define structures that replicate the memory layout of the format's internal structures, and read the structures in using Marshal.PtrToStructure (more advanced but potentially faster approach).

  • Like 1
Link to comment
Share on other sites

  • 0

I found that, and this: https://02b80dd998c9563491b4142043946711d5d74c71.googledrive.com/host/0B3fBvzttpiiSZFNVS2JjWkNnelk/Nickfile%20%28NK2%29%20format.pdf

 

How is this file type undocumented but there are apps out there that read and change this file?  hmmmm  I really want to get further into learning  software development but this kind of thing drives me crazy.  Thank you for the information Andre.

Link to comment
Share on other sites

  • 0

Well it's some Outlook format that's proprietary to Microsoft so the documentation certainly exists but it's internal to Microsoft. So Microsoft applications could open it. If any third-party application does it it could be that its author has reverse-engineered the format.

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.