1 ! Copyright (C) 2006 Chris Double.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: help.syntax help.markup byte-arrays io ;
7 { $values { "obj" "object to serialize" } }
8 { $description "Serializes the object to " { $link output-stream } "." } ;
11 { $values { "obj" "deserialized object" } }
12 { $description "Deserializes an object by reading from " { $link input-stream } "." } ;
15 { $values { "obj" "object to serialize" } { "bytes" byte-array }
17 { $description "Serializes the object to a byte array." } ;
20 { $values { "bytes" byte-array } { "obj" "deserialized object" }
22 { $description "Deserializes an object from a byte array." } ;
24 ARTICLE: "serialize" "Binary object serialization"
25 "The " { $vocab-link "serialize" } " vocabulary implements binary serialization for all Factor data types except for continuations. Unlike the prettyprinter, shared structure and circularity is preserved."
27 "Storing objects on streams:"
28 { $subsection serialize }
29 { $subsection deserialize }
30 "Storing objects as byte arrays:"
31 { $subsection object>bytes }
32 { $subsection bytes>object } ;