source: project/release/4/s11n/trunk/s11n.html @ 15282

Last change on this file since 15282 was 15282, checked in by felix winkelmann, 11 years ago

imported r4 version

File size: 8.8 KB
Line 
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2<!-- Generated by eggdoc Revision: 1.20  -->
3<html>
4<head>
5<title>Eggs Unlimited - s11n</title><style type="text/css"> <!--
6      CODE {
7            color: #666666;
8          }
9/*   DT.definition EM { font-weight: bold; font-style: normal; } */
10
11     DT.definition { 
12                   background: #eee;
13                   color: black;
14                   padding: 0.2em 1em 0.2em 0.7em;
15                   margin-left: 0.2em;
16border: 1px solid #bbc;
17                   font-family: "Andale Mono", monospace;
18                   /* font-size: 1.2em; */
19                   
20                 }
21     DD {
22                   margin-top: 0.8em;
23                   margin-bottom: 0.8em;
24     }
25     DIV.subsection {
26                    border-top: 1px solid #448;
27                    padding-left: 1em;
28                    margin-bottom: 1.2em;
29     }
30     DIV.subsubsection {
31                    border-top: 1px dotted #99c;
32                    /* border-left: 1px solid #99c; */
33                    padding-left: 1em;
34                    margin-bottom: 1.2em;
35     }
36     DIV.subsubsubsection {
37                    border-top: 1px solid #ddf;
38                    padding-left: 1em;
39                    margin-bottom: 1.2em;
40     }
41
42         DIV.section {
43                 margin-bottom: 1.5em;
44         }
45         a:link {
46                 color: #336;
47         }
48         a:visited { color: #666; }
49         a:active  { color: #966; }
50         a:hover   { color: #669; }
51         body { margin: 0; padding: 0; background: #fff; color: #000; font: 9pt "Lucida Grande", "Verdana", sans-serif; }
52         H2 {
53                 background: #336;
54                 color: #fff;
55                 padding-top: 0.5em;
56                 padding-bottom: 0.5em;
57                 padding-left: 16px;
58                 margin: 0 0 1em 0;
59        }
60        UL LI {
61                list-style: none;
62        }
63        TT {
64                font-family: "Andale Mono", monospace;
65                /* font-size: 1.2em; */
66        }
67        H3 {
68                color: #113;
69                margin-bottom: 0.5em;
70        }
71        H4, H5, H6 {
72                color: #113;
73                margin-bottom: 1.0em;
74        }
75        H5 {
76                font-weight: normal;
77                font-style: italic;
78                font-size: 100%;
79                margin-top: 1.2em;
80        }
81        H6 {
82                font-weight: bold;
83                font-size: 85%;
84                margin-top: 1.2em;
85        }
86     DIV#eggheader {
87         text-align: center;
88                 float: right;
89                 margin-right: 2em;
90     }
91     DIV#header IMG {
92            /* display: block; margin-left: auto; margin-right: auto;  */
93            /* float: right; */
94            border: none;  /* firefox */
95     }
96     DIV#footer {
97                background: #bbd;
98                padding: 0.7em ;
99                border-top: 1px solid #cce;
100     }
101     DIV#footer hr {
102                display: none;
103     }
104     DIV#footer a {
105                float: left;
106     }
107     DIV#revision-history {
108         float: right;
109     }
110     
111     DIV#body {
112                 margin: 1em 1em 1em 16px;
113         }
114
115     DIV#examples PRE {
116       background: #eef;
117       padding: 0.1em;
118       border: 1px solid #aac;
119     }
120     PRE#license, DIV#examples PRE {
121       padding: 0.5em;
122     }
123     DIV#examples PRE {
124       /* font-size: 85%; */
125     }
126     PRE { font-family: "Andale Mono", monospace; }
127     TABLE {
128       background: #eef;
129       padding: 0.2em;
130       border: 1px solid #aac;
131       border-collapse: collapse;
132       width: 100%;
133     }
134     TABLE.symbol-table TD.symbol {
135          width: 15em;
136          font-family: "Andale Mono", monospace;
137          /* font-size: 1.2em; */
138     }
139     TH {
140       text-align: left;
141       border-bottom: 1px solid #aac;
142       padding: 0.25em 0.5em 0.25em 0.5em;
143     } 
144     TD { padding: 0.25em 0.5em 0.25em 0.5em; }
145     --></style></head>
146<body>
147<div id="header">
148<h2>s11n</h2>
149<div id="eggheader"><a href="index.html">
150<img src="egg.jpg" alt="[Picture of an egg]" /></a></div></div>
151<div id="body">
152<div class="section">
153<h3>Description</h3>
154<p>Serialization and deserialization of arbitrary objects</p></div>
155<div class="section">
156<h3>Author</h3><a href="mailto:felix@call-with-current-continuation.org">felix</a></div>
157<div class="section">
158<h3>Version</h3>
159<ul>
160<li>0.9 doesn't use easyffi anymore</li>
161<li>0.8 Made fallback-handler more useful and fixed a bug [Thanks to Daishi Kato]</li>
162<li>0.7 Added fallback-handler to `deserialize'</li>
163<li>0.6 Nasty little bug in backreferences fixed</li>
164<li>0.5 Hash-table-deserialization bug reported by Kabir Soorya</li>
165<li>0.4 Fixed small bug in port-serialization; added note about continuations</li>
166<li>0.3 Serialization of hash-tables is more storage efficient; added `chicken-dump' program</li>
167<li>0.2 Failure handling for some cases was invalid</li>
168<li>0.1 Initial release</li></ul></div>
169<div class="section">
170<h3>Usage</h3><tt>(require-extension s11n)</tt></div>
171<div class="section">
172<h3>Download</h3><a href="s11n.egg">s11n.egg</a></div>
173<div class="section">
174<h3>Documentation</h3>
175<p>This extension allows serializing and deserializing arbitrary data (including procedures and continuations) into/from ports. Circular data is support as well as uninterned symbols. Foreign-pointer objects and ports other than the default input-, output- and error-ports can not be serialized. Threads may be serialized provided they are not running or ready (this means suspended or created but not yet started threads).</p>
176<p>The serialized data is endianness- and word-size dependent.</p>
177<p>To enable serialization of procedures and continuations, CHICKEN has to be built with the <tt>--enable-procedure-tables</tt> configuration option. In particular, any compiled module that is referenced in serialized data has to be compiled with a CHICKEN version that has procedure tables enabled.</p>
178<p>Compiled procedures and continuations can be deserialized, provided that the same executable or libraries are loaded/linked - the compiled code must be available so that the deserialization process can find the associated code.</p>
179<p>Continuations can be serialized but care has to be taken about what exactly is stored in such an object. Every invocation of <tt>call-with-current-continuation</tt> includes the complete list of pending <tt>dynamic-wind</tt> thunks (and their dynamic environment) which is likely to include non-serializable state.</p>
180<p>Since the deserialization process breaks any assumptions about a unique identity of objects, TinyCLOS instances and classes can currently not be deserialized.</p>
181<p>CHICKEN version 2.207 or higher is required to use this extension.</p>
182<dl>
183<dt class="definition"><strong>procedure:</strong> (serialize X [PORT [SERIALIZER]])</dt>
184<dd>
185<p>Writes a binary representation of <tt>X</tt> into <tt>PORT</tt> which defaults to the value of <tt>(current-output-port)</tt>. If the serialization is unable to handle some object, the procedure <tt>SERIALIZER</tt> is invoked with that object as it's sole argument. The procedure should either signal an error or return a placeholder object that is to be serialized instead. If no serializer is specified, an error will be signalled.</p></dd>
186<dt class="definition"><strong>procedure:</strong> (deserialize [PORT [DESERIALIZER]])</dt>
187<dd>
188<p>Reads a binary representation of a Scheme data object from <tt>PORT</tt> which defaults to the value of <tt>(current-input-port)</tt>. The deserialized object is returned.</p>
189<p>If <tt>DESERIALIZER</tt> is given, then it will be called for procedure objects that can not be deserialized (normally because a serialized file was generated by a different version of CHICKEN) with the procedure-id (internal name) and the deserialized closure object as argument.</p></dd></dl>
190<dl>
191<p>A separate tool is also available, named <tt>chicken-dump</tt> that writes a description about the contents of a serialized file. Just invoke
192<pre>chicken-dump FILENAME</pre>
193<p>on the command prompt.</p></p></dl></div>
194<div class="section">
195<h3>License</h3>
196<pre>Copyright (c) 2005, Felix Winkelmann.  All rights reserved.
197
198Permission is hereby granted, free of charge, to any person obtaining a
199copy of this software and associated documentation files (the Software),
200to deal in the Software without restriction, including without limitation
201the rights to use, copy, modify, merge, publish, distribute, sublicense,
202and/or sell copies of the Software, and to permit persons to whom the
203Software is furnished to do so, subject to the following conditions:
204
205The above copyright notice and this permission notice shall be included
206in all copies or substantial portions of the Software.
207
208THE SOFTWARE IS PROVIDED ASIS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
209IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
210FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
211THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
212OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
213ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
214OTHER DEALINGS IN THE SOFTWARE.</pre></div></div>
215<div id="footer">
216<hr /><a href="index.html">&lt; Egg index</a>
217<div id="revision-history">$Revision$ $Date$</div>&nbsp;</div></body></html>
Note: See TracBrowser for help on using the repository browser.