]> gitweb.factorcode.org Git - factor.git/blob - basis/serialize/serialize-docs.factor
Update actions, because Node.js 16 actions are deprecated, to Node.js 20
[factor.git] / basis / serialize / serialize-docs.factor
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 ;
4 IN: serialize
5
6 HELP: serialize
7 { $values { "obj" "object to serialize" } }
8 { $description "Serializes the object to " { $link output-stream } "." } ;
9
10 HELP: deserialize
11 { $values { "obj" "deserialized object" } }
12 { $description "Deserializes an object by reading from " { $link input-stream } "." } ;
13
14 HELP: object>bytes
15 { $values { "obj" "object to serialize" } { "bytes" byte-array }
16 }
17 { $description "Serializes the object to a byte array." } ;
18
19 HELP: bytes>object
20 { $values { "bytes" byte-array } { "obj" "deserialized object" }
21 }
22 { $description "Deserializes an object from a byte array." } ;
23
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."
26 $nl
27 "Storing objects on streams:"
28 { $subsections
29     serialize
30     deserialize
31 }
32 "Storing objects as byte arrays:"
33 { $subsections
34     object>bytes
35     bytes>object
36 } ;
37
38 ABOUT: "serialize"