This is s11n.egg.info, produced by makeinfo version 4.7 from eggdoc-output.texi. INFO-DIR-SECTION The Algorithmic Language Scheme START-INFO-DIR-ENTRY * s11n.egg: (s11n.egg). Serialization and deserialization of arbitrary objects END-INFO-DIR-ENTRY  File: s11n.egg.info, Node: Top, Next: About this egg, Up: (dir) s11n egg ******** Serialization and deserialization of arbitrary objects Written by felix (mailto:felix@call-with-current-continuation.org) This manual corresponds to version 0.6 of the s11n extension library for Chicken Scheme. * Menu: * About this egg:: * Documentation:: * License:: * Index::  File: s11n.egg.info, Node: About this egg, Next: Documentation, Prev: Top, Up: Top 1 About this egg **************** * Menu: * Version history:: * Usage::  File: s11n.egg.info, Node: Version history, Next: Usage, Up: About this egg 1.1 Version history =================== `0.6' Nasty little bug in backreferences fixed `0.5' Hash-table-deserialization bug reported by Kabir Soorya `0.4' Fixed small bug in port-serialization; added note about continuations `0.3' Serialization of hash-tables is more storage efficient; added `chicken-dump' program `0.2' Failure handling for some cases was invalid `0.1' Initial release  File: s11n.egg.info, Node: Usage, Prev: Version history, Up: About this egg 1.2 Usage ========= Load this egg like so: `(require-extension s11n)'  File: s11n.egg.info, Node: Documentation, Next: License, Prev: About this egg, Up: Top 2 Documentation *************** 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). The serialized data is endianness- and word-size dependent. To enable serialization of procedures and continuations, CHICKEN has to be built with the `--enable-procedure-tables' 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. 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. Continuations can be serialized but care has to be taken about what exactly is stored in such an object. Every invocation of `call-with-current-continuation' includes the complete list of pending `dynamic-wind' thunks (and their dynamic environment) which is likely to include non-serializable state. Since the deserialization process breaks any assumptions about a unique identity of objects, TinyCLOS instances and classes can currently not be deserialized. CHICKEN version 2.207 or higher is required to use this extension. -- procedure: serialize (serialize X [PORT [SERIALIZER]]) Writes a binary representation of `X' into `PORT' which defaults to the value of `(current-output-port)'. If the serialization is unable to handle some object, the procedure `SERIALIZER' 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. -- procedure: deserialize (deserialize [PORT]) Reads a binary representation of a Scheme data object from `PORT' which defaults to the value of `(current-input-port)'. The deserialized object is returned. A separate tool is also available, named `chicken-dump' that writes a description about the contents of a serialized file. Just invoke chicken-dump FILENAME on the command prompt.  File: s11n.egg.info, Node: License, Next: Index, Prev: Documentation, Up: Top 3 License ********* Copyright (c) 2005, Felix Winkelmann. All rights reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the Software), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED ASIS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.  File: s11n.egg.info, Node: Index, Prev: License, Up: Top Index ***** [index] * Menu: * deserialize: Documentation. (line 50) * serialize: Documentation. (line 39)  Tag Table: Node: Top252 Node: About this egg627 Node: Version history792 Node: Usage1309 Node: Documentation1467 Node: License4080 Node: Index5267  End Tag Table