(index ("pack" 0) ("pack-uint" 498) ("pack-sint" 562) ("pack-float" 626) ("pack-double" 692) ("pack-bin" 760) ("pack-str" 826) ("pack-array" 889) ("pack-map" 956) ("pack-ext" 1023) ("unpack" 1083) ("extension" 1153))
(def (sig (procedure "(pack PORT VALUE)" (id pack))) (p "This procedure will call primitive type packers, with the following rules:") (ul (li "if the VALUE has a packer, apply it.") (li "if the VALUE is a string, it will be packed as str.") (li "if the VALUE is a blob, it will be packed as bin.") (li "if the VALUE is a char, it will be packed as a uint.") (li "if the VALUE is a list, it will be packed as an array.") (li "if the VALUE is a extension (see below), it will be packed as an ext")))
(def (sig (procedure "(pack-uint PORT VALUE)" (id pack-uint))))
(def (sig (procedure "(pack-sint PORT VALUE)" (id pack-sint))))
(def (sig (procedure "(pack-float PORT VALUE)" (id pack-float))))
(def (sig (procedure "(pack-double PORT VALUE)" (id pack-double))))
(def (sig (procedure "(pack-bin PORT BYTE-BLOB)" (id pack-bin))))
(def (sig (procedure "(pack-str PORT STRING)" (id pack-str))))
(def (sig (procedure "(pack-array PORT VECTOR)" (id pack-array))))
(def (sig (procedure "(pack-map PORT HASH-TABLE)" (id pack-map))))
(def (sig (procedure "(pack-ext PORT EXT)" (id pack-ext))))
(def (sig (procedure "(unpack PORT [MAPPER identity])" (id unpack))))
(def (sig (record "(extension type data)" (id extension))) (ul (li "type: integer from 0 to 127") (li "data: a byte-blob")))
