I just discovered vlf-mode (View Large Files) and I am using it to view a large binary file in hexl-mode and read certain metadata from headers within the file. It works great, with one exception. When I move to another "batch" within the file, hexl-mode starts the addresses of the next batch at 0x00000000 which makes it hard to know which byte I am actually at.

Are there existing solutions for viewing large binary files but maintaining information about the absolute "address" of a given line?


That sounds like a missing feature in vlf-mode, and quite possibly some missing customization in hexl-mode.

The way hexl-mode works if by running the hexl program (shipped with Emacs, see hexl-program), and displaying the output. This output already contains the offsets, they're just made non-editable. So, vlf-mode should add vlf-start-pos to all of those. Then of course, things like hexl-goto-address should also be modified, by transparently substracting the same vls-start-pos. It might also be worth forcing vlf-batch-size to be alignment friendly by making it a multiple of 256 when hexl-mode is used.

That sounds like a too invasive change to do it here, but I suspect the vlf-mode author would appreciate the feedback, and would be in a good position to implement just that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.