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

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

Re: Package for data serialization?


From: Pascal Bourguignon
Subject: Re: Package for data serialization?
Date: Tue, 13 Jun 2006 13:13:53 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

spamfilteraccount@gmail.com writes:

> Is there a package for de/serializing an arbitrary elisp data
> structure, so that it can be read/written in binary format from/to
> disk?
>
> I know about prin1 and co., but they create a printed representation
> and I want binary for speed and size.


There is no emacs lisp function to get the binary representation of a
cons cell, or a number or a string or anything, AFAIK.

So you won't be able to write in emacs lisp any function converting
values to binary any faster than prin1.


You may want to try it in C, adding primitive functions.  You will
still have to do a lot of work, like converting pointers into OID,
etc.


IIRC, there is a mean to save an emacs lisp image, so you could save
the whole data structure, along with the whole emacs in a new emacs
image, and then you'd run this image instead of a virgin emacs.


-- 
__Pascal Bourguignon__                     http://www.informatimago.com/

NEW GRAND UNIFIED THEORY DISCLAIMER: The manufacturer may
technically be entitled to claim that this product is
ten-dimensional. However, the consumer is reminded that this
confers no legal rights above and beyond those applicable to
three-dimensional objects, since the seven new dimensions are
"rolled up" into such a small "area" that they cannot be
detected.


reply via email to

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