BINVIEW

Install

Download binview.el and put it in a folder where Emacs can find it, e.g. site-lisp. Add following lines to your .emacs initialization file:

	  (require 'binview)
	

How to Use

First you load a binary file into Emacs using hexl-find-file. Put the cursor to the point that you are interested, and type M-x binview-from-point. It will ask what the format you are going to view in. For example, "bitmap" is a predefined format.

Add new formats

You can add new formats to the binview-format-alist. For example, we define binview-format-bitmap as:

(defvar binview-format-bitmap
  '(
    ("ID"        binview-char 2)
    ("FILESIZE"  binview-uint32)
    ("RESERVED"  binview-uint16 2)
    ("OFFSET"    binview-uint32)
    ("biSize"    binview-uint32)
    ("biWidth"   binview-int32)
    ("biHeight"  binview-int32)
    ("biPlanes"  binview-uint16)
    ("biBitCount" binview-uint16)
    ("biCompression" binview-uint32)
    ("biSizeImage"  binview-uint32)
    ("biXPelsPerMeter" binview-int32)
    ("biYPelsPerMeter" binview-int32)
    ("biClrUsed"  binview-uint32)
    ("biClrImportant" binview-uint32)
    )
  "Bitmap file header and bitmap information header."
  )