This sounds really cool. I often need to write arbitrary binary files (usually payload for some network packet injection or other) and always have to resort to printf-ing to a file, which is a pain. Please let us all know if/when you get it up on the web!
BTW I always liked B-trees. There's something very cunning and elegant about them such that I usually end up (as in this case) thinking "Well, that's clearly the best way to do it... but I would never have thought of it in a million years!" Good for you.
Annoyingly, my biggest current block to putting it up on the web is that I don't have a name for the hex editor! Its working title for the past ten years has been "axe", partly because you could claim it stands for "advanced hex editor" but mostly because an axe is a tool used for hacking :-) Unfortunately, during those ten years someone else has published a hex editor called AXE, presumably for the same reasons, so I need a new name.
Current best options are "heck" (half way between "hex" and "hack") and "tweak", but I'm uncertain I like either of them. Any suggestions welcome :-)
BTW I always liked B-trees. There's something very cunning and elegant about them such that I usually end up (as in this case) thinking "Well, that's clearly the best way to do it... but I would never have thought of it in a million years!" Good for you.
Current best options are "heck" (half way between "hex" and "hack") and "tweak", but I'm uncertain I like either of them. Any suggestions welcome :-)
Hedit ( = hex edit)
Stax (S.T.'s advanced hex)
haXXor (:-))