How to show large quantity of hex text in Cocoa?

243 Views Asked by At

I want to make a Mac app to view and edit several GB sized binary files.

How do I start off? :-(

I thought I should begin with a simple scrolling hex viewer, but stuck already.

I think NSTextView is not the way to go. Because I only need to draw 255 kind of two character pair over and over. Also need to manage huge text data.

1) can I use NSLayoutManager drawGlyphsForGlyphRange method?
2) is it possible with NSTextView and clever text management?
3) or something else?

It will be greatly helpful if I could consult samples or demos.

1

There are 1 best solutions below

2
On BEST ANSWER

http://github.com/ridiculousfish/HexFiend/

Hex Fiend is an open source hex editor that can edit huge files (the website says it has been tested on a 118GB file).