You are looking at historical revision 33669 of this page. It may differ significantly from its current revision.

msgpack

Author

Hugo Arregui

Requirements

Description

A MessagePack implementation for scheme.

API

Pack

[procedure] (pack PORT VALUE)

This procedure will call primitive type packers, with the following rules:

[procedure] (pack-uint PORT VALUE)
[procedure] (pack-sint PORT VALUE)
[procedure] (pack-float PORT VALUE)
[procedure] (pack-double PORT VALUE)
[procedure] (pack-bin PORT BYTE-BLOB)
[procedure] (pack-str PORT STRING)
[procedure] (pack-array PORT VECTOR)
[procedure] (pack-map PORT HASH-TABLE)
[procedure] (pack-ext PORT EXT)

Unpack

[procedure] (unpack PORT [MAPPER identity])

Extension

Definition:

A extension type is simply a three element list (header type data):

(list 'ext TYPE DATA)

Example:

(list 'ext 1 ,(string->byte-blob "hi"))

License

BSD