4 Attachment(s)
Re: displaying binary files
I wanted to do a pff reader to edit old games, and ended up doing an hexadecimal reader/storer for my thesis, so basically it's the same idea. You can output streams of char and compare them with a function "showHexContent", so it may be a good hint about how to read such files. «ReadFromFile» is the function that reads ... the file, as a vector of char. All data is held in a std::vector<char> buffer.
You can also do your conversions to vectors of floats, char, or customized types, but I assume that's not what you're looking for for now, unless you already have a dedicated class with the good data layout that exactly fits the data of your file, that you could then compare with an operator in C++.
It's currently on developpement, and there are high chances that you encounter bugs if you use it, also, there is a customized header, so you may have to code your own thing to read from the very beginning of the file instead, but that's the most I can do to help ! I hope it's not too badly commented, but I can't do better for the moment, ask questions if you're interressed !
I had to rename HexaParserFunction into .hpp
Attachment 13546
Attachment 13548
Attachment 13549
Attachment 13551
EDIT: it's command line stuff, but then you just have to display the content into a Widget if you want. Data is already aligned when displayed. Runs on linux for me, may be machine dependent for some stuff.