• 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
https://www.neowin.net/forum/topic/1226897-reading-and-parsing-strange-files/
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
  • 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.

  • 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.

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

    • No registered users viewing this page.
  • Posts

    • What annoys me is the people that try to buy a higher end product, and then low ball you, and say but I don't need that function, all I need is to use it for video out so I don't feel like paying higher price.   I had a person that was trying to buy RTX 3080 from me for $100 and his excuse was, well I won't be playing games on it, I just need four monitor outout. Or someone was trying to buy 2TB Gen5 M.2 for $50, well I don't need the speed, is just for basic storage. Or i was offered $80 for 20TB hard drive, that person said well, right now I only about 7TB, so rest won't be in use Just some examples in last month or two...   The guy with the 3080, I replied to with something like go to Chevy dealer and offer them $15K for that brand new corvette and tell them that you you only need to drive to work, so you don't need to go fast.   There a lot of low ballers that try to take advantage.
    • Not in Syracuse, NY. They're about to break ground! https://www.syracuse.com/micro...on-and-other-tech-jobs.html
    • Here in Finland we have lots of rural areas with narrow roads, one of the highest taxes in the world (cars are taxed way above EU standards) and fuel is quite expensive. Yet we educate our drivers to drive responsibly and safely in all areas, and our people respect each others rights and freedom to move around safely. Which is why we have even small children under 10 years old walking and cycling alone to schools in the streets, even in big cities. Safety is about being responsible and about respecting others. And I would hate to see AI (or anyone else) destroy our way of life. There are and always will be outliers, accidents happen and machines break. I dont't want to see people relying on AI to do things like driving for them. I want people to think and react to the world around them themselves, and being responsible instead of them browsing TikTok or whatever instead of looking out the window, and then saying that "It wasn't me, it was the car". Already people walk around town with their eyes glued to a screen – I don't want people driving around the same way.
    • And I should hope none will. I don't want to walk ouside to have some randome AI drive over me and mine. Not that I want a person to do it either but I want there to be an actual person who takes responsibility of their actions instead of relinquishing control to a machine. In some highways I can accept self-driving, but even then there should be some kind of dead man switch etc. that actually monitors the drivers status.
    • No thank you. I want to drive myself, and not just because I don't trust a machine or whatever – I like driving, and I like doing it with a manual car without lane guidance and all other "driver assists". I wven rarely use cruise control. I went through and paid for to have a license to that allows me to do it, and do it responsibly instead of relinquishing control to a machine. I currently drive a van for work in a city, something like 200 km/day. If we everything is automated and computers decide everything for us, the dumber people will get since they don't have to bother thinking for themselves nor do they have to take responsibility for themselves since "it wasn't me, it was the machine" will be their future defence for everything. Soon, Neowin's writers will be out of a job because AI can do it just fine and it doesn't need pay. Wikipedia – a free service with voluntary writers – just started replacing real people with AI, and had to shut it down (at least for now). Lets let ai AI and those that run it (or rather run them) the keys the the world and watch it burn because no one is able to actually do anything without some AI assistant telling them what to do (driving included). What a world!
  • Recent Achievements

    • One Month Later
      POR2GAL4EVER earned a badge
      One Month Later
    • One Year In
      Orpheus13 earned a badge
      One Year In
    • One Month Later
      Orpheus13 earned a badge
      One Month Later
    • Week One Done
      Orpheus13 earned a badge
      Week One Done
    • Week One Done
      serfegyed earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      536
    2. 2
      ATLien_0
      247
    3. 3
      +FloatingFatMan
      176
    4. 4
      +Edouard
      166
    5. 5
      Xenon
      118
  • Tell a friend

    Love Neowin? Tell a friend!