help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Binary file features?


From: Basile Starynkevitch
Subject: Re: Binary file features?
Date: Mon, 17 Jul 2023 08:23:28 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0


On 7/17/23 07:56, Ergus wrote:
Hi all:

If there is a binary file with known format (ie, it was somehow saved
form C++ or numpy) nothing extremely complicated something like an array
of structs, or a header+payload of known data...

Do we have anything in elisp to visualize the data in some user-friendly
way? (after providing some information about the format somehow?)


Yes. A well documented binary format is the ELF format (Executable and Linkable Format, used for binaries on Linux, most Unixes, etc...)

https://en.wikipedia.org/wiki/Executable_and_Linkable_Format

An alternative could be to use the BJSON format specification:

http://bjson.org/


Or the RPC/XDR one:

https://en.wikipedia.org/wiki/External_Data_Representation


In the context of GNU emacs, you might need to patch its C source code to add some few routines dedicated to that binary format (that you have chosen, and whose specification you know completely). This means writing your plugin for GNU emacs and extending nicely GNU emacs code to do the appropriate dlopen/dlsym. Some C code already exists in file src/dynlib.c of GNU emacs 30. Or to write some Elisp code communicating with your daemon handling that binary format.


NB. my pet open source project is the RefPerSys inference engine on http://refpersys.org/ and https://github.com/RefPerSys/RefPerSys/ - I believe that you could take several thousands lines of code from it and reuse them in your GNU emacs plugin.

--
Basile Starynkevitch                  <basile@starynkevitch.net>
(only mine opinions / les opinions sont miennes uniquement)
92340 Bourg-la-Reine, France
web page: starynkevitch.net/Basile/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]