The cl-messagepack Reference Manual

This is the cl-messagepack Reference Manual, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 05:09:14 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 cl-messagepack

A Common-Lisp implementation of Message Pack serialization.

Author

Miron Brezuleanu

License

Simplified BSD License

Dependencies
  • flexi-streams (system).
  • babel (system).
  • closer-mop (system).
Source

cl-messagepack.asd.

Child Components

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


3.1 Lisp


3.1.1 cl-messagepack/cl-messagepack.asd

Source

cl-messagepack.asd.

Parent Component

cl-messagepack (system).

ASDF Systems

cl-messagepack.


3.1.2 cl-messagepack/package.lisp

Source

cl-messagepack.asd.

Parent Component

cl-messagepack (system).

Packages

3.1.3 cl-messagepack/cl-messagepack.lisp

Dependency

package.lisp (file).

Source

cl-messagepack.asd.

Parent Component

cl-messagepack (system).

Public Interface
Internals

4 Packages

Packages are listed by definition order.


4.1 messagepack-sym

Source

package.lisp.

Used By List

messagepack.

Public Interface

id (slot).


4.2 messagepack

Source

package.lisp.

Nickname

mpk

Use List
Public Interface
Internals

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


5.1 Public Interface


5.1.1 Special variables

Special Variable: *decode-bin-as-string*
Package

messagepack.

Source

cl-messagepack.lisp.

Special Variable: *decoder-prefers-alists*
Package

messagepack.

Source

cl-messagepack.lisp.

Special Variable: *decoder-prefers-lists*
Package

messagepack.

Source

cl-messagepack.lisp.

Special Variable: *encode-alist-as-map*
Package

messagepack.

Source

cl-messagepack.lisp.

Special Variable: *extended-types*
Package

messagepack.

Source

cl-messagepack.lisp.

Special Variable: *int->symbol*
Package

messagepack.

Source

cl-messagepack.lisp.

Special Variable: *lookup-table*
Package

messagepack.

Source

cl-messagepack.lisp.

Special Variable: *symbol->int*
Package

messagepack.

Source

cl-messagepack.lisp.

Special Variable: *use-null*
Package

messagepack.

Source

cl-messagepack.lisp.


5.1.2 Macros

Macro: with-symbol-int-table (tables &body body)
Package

messagepack.

Source

cl-messagepack.lisp.


5.1.3 Ordinary functions

Function: decode (byte-array)
Package

messagepack.

Source

cl-messagepack.lisp.

Function: decode-stream (stream)
Package

messagepack.

Source

cl-messagepack.lisp.

Function: define-extension-types (args)

This function defines types for the MessagePack extension type system (#xD4 to #xD8, and #xC7 to #xC9), and returns a list of them
that can be bound to *EXTENSION-TYPES*.
128 different types can be available simultaneously at any one time.

This function takes integers, flags, and/or closures as arguments; these get used as items for the next arguments.
* Integers define which type number to use next.
* Flags for decoding:
:BYTE-ARRAY - return the bytes as array. Default.
:NUMERIC - return value in DATA as a number. Only for fixextN. * A symbol associates the current type number to this type;
this type should be derived from MESSAGEPACK-EXT-TYPE, as
to have a correct MESSAGEPACK:ID slot.

Example:
(defvar *my-extension-types*
(define-extension-types :numeric
5 ’buffer ’block
8 ’cursor))
Eg., the type 6 would then return (MAKE-BLOCK ’ID <content>).

Package

messagepack.

Source

cl-messagepack.lisp.

Function: encode (data)
Package

messagepack.

Source

cl-messagepack.lisp.

Function: encode-stream (data stream)
Package

messagepack.

Source

cl-messagepack.lisp.

Function: get-symbol-int-table (table)
Package

messagepack.

Source

cl-messagepack.lisp.

Function: make-lookup-table ()

Returns something that can be used for *LOOKUP-TABLE*.

Package

messagepack.

Source

cl-messagepack.lisp.

Function: symbol-to-extension-type (num sym decode-as)
Package

messagepack.

Source

cl-messagepack.lisp.

Function: write-hex (data)
Package

messagepack.

Source

cl-messagepack.lisp.


5.1.4 Standalone methods

Method: print-object ((obj extension-type) stream)
Source

cl-messagepack.lisp.

Method: print-object ((obj extension-type-description) stream)
Source

cl-messagepack.lisp.

Method: shared-initialize :after ((extension extension-type) slot-names &key id &allow-other-keys)
Source

cl-messagepack.lisp.


5.1.5 Classes

Class: extension-type

Base type for Ext-Types.

Package

messagepack.

Source

cl-messagepack.lisp.

Direct methods
Direct slots
Slot: id
Package

messagepack-sym.

Type

(or integer (array (unsigned-byte 8) *))

Readers

extension-type-id.

Writers

(setf extension-type-id).


5.2 Internals


5.2.1 Special variables

Special Variable: *use-false*
Package

messagepack.

Source

cl-messagepack.lisp.


5.2.2 Macros

Macro: load-big-endian (stream byte-count)
Package

messagepack.

Source

cl-messagepack.lisp.

Macro: signed-unsigned-convertors (size)
Package

messagepack.

Source

cl-messagepack.lisp.

Macro: store-big-endian (number stream byte-count)
Package

messagepack.

Source

cl-messagepack.lisp.


5.2.3 Ordinary functions

Function: alistp (l)

Alist predicate

Package

messagepack.

Source

cl-messagepack.lisp.

Function: decode-array (length stream)
Package

messagepack.

Source

cl-messagepack.lisp.

Function: decode-byte-array (length stream)
Package

messagepack.

Source

cl-messagepack.lisp.

Function: decode-cons (stream)
Package

messagepack.

Source

cl-messagepack.lisp.

Function: decode-map (length stream)
Package

messagepack.

Source

cl-messagepack.lisp.

Function: decode-rational (stream)
Package

messagepack.

Source

cl-messagepack.lisp.

Function: decode-string (length stream)
Package

messagepack.

Source

cl-messagepack.lisp.

Function: decode-symbol (stream)
Package

messagepack.

Source

cl-messagepack.lisp.

Function: decode-symbol-as-number (stream)
Package

messagepack.

Source

cl-messagepack.lisp.

Function: encodable-as-integer (data)
Package

messagepack.

Source

cl-messagepack.lisp.

Function: encode-array (data stream)
Package

messagepack.

Source

cl-messagepack.lisp.

Function: encode-cons (data stream)
Package

messagepack.

Source

cl-messagepack.lisp.

Function: encode-each (data stream)
Package

messagepack.

Source

cl-messagepack.lisp.

Function: encode-float (data stream &optional drop-prefix)
Package

messagepack.

Source

cl-messagepack.lisp.

Function: encode-hash (data stream)
Package

messagepack.

Source

cl-messagepack.lisp.

Function: encode-integer (data stream)
Package

messagepack.

Source

cl-messagepack.lisp.

Function: encode-rational (data stream)
Package

messagepack.

Source

cl-messagepack.lisp.

Function: encode-raw-bytes (data stream)
Package

messagepack.

Source

cl-messagepack.lisp.

Function: encode-sequence-length (data stream short-prefix short-length typecode-16 typecode-32)
Package

messagepack.

Source

cl-messagepack.lisp.

Function: encode-string (data stream)
Package

messagepack.

Source

cl-messagepack.lisp.

Function: encode-symbol (data stream)
Package

messagepack.

Source

cl-messagepack.lisp.

Function: is-byte-array (data-type)
Package

messagepack.

Source

cl-messagepack.lisp.

Function: lookup-table-find (type id)
Package

messagepack.

Source

cl-messagepack.lisp.

Function: lookup-table-insert (type id obj)
Package

messagepack.

Source

cl-messagepack.lisp.

Function: make-hash (data)
Package

messagepack.

Source

cl-messagepack.lisp.

Function: mkstr (&rest args)
Package

messagepack.

Source

cl-messagepack.lisp.

Function: mksymb (&rest args)
Package

messagepack.

Source

cl-messagepack.lisp.

Function: parse-big-endian (byte-array)
Package

messagepack.

Source

cl-messagepack.lisp.

Function: plistp (l)

Plist predicate.

Package

messagepack.

Source

cl-messagepack.lisp.

Function: pure-cons (data)
Package

messagepack.

Source

cl-messagepack.lisp.

Function: sb16->ub16 (sb)
Package

messagepack.

Source

cl-messagepack.lisp.

Function: sb32->ub32 (sb)
Package

messagepack.

Source

cl-messagepack.lisp.

Function: sb64->ub64 (sb)
Package

messagepack.

Source

cl-messagepack.lisp.

Function: sb8->ub8 (sb)
Package

messagepack.

Source

cl-messagepack.lisp.

Function: sbcl-encode-float (data stream &optional drop-prefix)
Package

messagepack.

Source

cl-messagepack.lisp.

Function: speed-for-size (size)
Package

messagepack.

Source

cl-messagepack.lisp.

Function: try-encode-ext-type (obj stream)
Package

messagepack.

Source

cl-messagepack.lisp.

Function: typed-data (type-num bytes)
Package

messagepack.

Source

cl-messagepack.lisp.

Function: ub16->sb16 (sb)
Package

messagepack.

Source

cl-messagepack.lisp.

Function: ub32->sb32 (sb)
Package

messagepack.

Source

cl-messagepack.lisp.

Function: ub64->sb64 (sb)
Package

messagepack.

Source

cl-messagepack.lisp.

Function: ub8->sb8 (sb)
Package

messagepack.

Source

cl-messagepack.lisp.


5.2.4 Generic functions

Generic Reader: as-numeric (object)
Package

messagepack.

Methods
Reader Method: as-numeric ((extension-type-description extension-type-description))

automatically generated reader method

Source

cl-messagepack.lisp.

Target Slot

as-numeric.

Generic Writer: (setf as-numeric) (object)
Package

messagepack.

Methods
Writer Method: (setf as-numeric) ((extension-type-description extension-type-description))

automatically generated writer method

Source

cl-messagepack.lisp.

Target Slot

as-numeric.

Generic Reader: decode-with (object)
Package

messagepack.

Methods
Reader Method: decode-with ((extension-type-description extension-type-description))

automatically generated reader method

Source

cl-messagepack.lisp.

Target Slot

decode-with.

Generic Writer: (setf decode-with) (object)
Package

messagepack.

Methods
Writer Method: (setf decode-with) ((extension-type-description extension-type-description))

automatically generated writer method

Source

cl-messagepack.lisp.

Target Slot

decode-with.

Generic Reader: encode-with (object)
Package

messagepack.

Methods
Reader Method: encode-with ((extension-type-description extension-type-description))

automatically generated reader method

Source

cl-messagepack.lisp.

Target Slot

encode-with.

Generic Writer: (setf encode-with) (object)
Package

messagepack.

Methods
Writer Method: (setf encode-with) ((extension-type-description extension-type-description))

automatically generated writer method

Source

cl-messagepack.lisp.

Target Slot

encode-with.

Generic Reader: extension-type-id (object)
Package

messagepack.

Methods
Reader Method: extension-type-id ((extension-type extension-type))

automatically generated reader method

Source

cl-messagepack.lisp.

Target Slot

id.

Generic Writer: (setf extension-type-id) (object)
Package

messagepack.

Methods
Writer Method: (setf extension-type-id) ((extension-type extension-type))

automatically generated writer method

Source

cl-messagepack.lisp.

Target Slot

id.

Generic Reader: reg-class (object)
Package

messagepack.

Methods
Reader Method: reg-class ((extension-type-description extension-type-description))

automatically generated reader method

Source

cl-messagepack.lisp.

Target Slot

reg-class.

Generic Writer: (setf reg-class) (object)
Package

messagepack.

Methods
Writer Method: (setf reg-class) ((extension-type-description extension-type-description))

automatically generated writer method

Source

cl-messagepack.lisp.

Target Slot

reg-class.

Generic Reader: type-number (object)
Package

messagepack.

Methods
Reader Method: type-number ((extension-type-description extension-type-description))

automatically generated reader method

Source

cl-messagepack.lisp.

Target Slot

type-number.

Generic Writer: (setf type-number) (object)
Package

messagepack.

Methods
Writer Method: (setf type-number) ((extension-type-description extension-type-description))

automatically generated writer method

Source

cl-messagepack.lisp.

Target Slot

type-number.


5.2.5 Classes

Class: extension-type-description
Package

messagepack.

Source

cl-messagepack.lisp.

Direct methods
Direct slots
Slot: type-number
Type

(integer 0 127)

Initform

(error "missing")

Initargs

:type-number

Readers

type-number.

Writers

(setf type-number).

Slot: encode-with
Type

function

Initform

(error "missing")

Initargs

:encode-with

Readers

encode-with.

Writers

(setf encode-with).

Slot: decode-with
Type

function

Initform

(error "missing")

Initargs

:decode-with

Readers

decode-with.

Writers

(setf decode-with).

Slot: as-numeric
Type

(member t nil)

Initform

(error "missing")

Initargs

:as-numeric

Readers

as-numeric.

Writers

(setf as-numeric).

Slot: reg-class
Initargs

:reg-class

Readers

reg-class.

Writers

(setf reg-class).


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   (  
A   D   E   F   G   I   L   M   P   R   S   T   U   W  
Index Entry  Section

(
(setf as-numeric): Private generic functions
(setf as-numeric): Private generic functions
(setf decode-with): Private generic functions
(setf decode-with): Private generic functions
(setf encode-with): Private generic functions
(setf encode-with): Private generic functions
(setf extension-type-id): Private generic functions
(setf extension-type-id): Private generic functions
(setf reg-class): Private generic functions
(setf reg-class): Private generic functions
(setf type-number): Private generic functions
(setf type-number): Private generic functions

A
alistp: Private ordinary functions
as-numeric: Private generic functions
as-numeric: Private generic functions

D
decode: Public ordinary functions
decode-array: Private ordinary functions
decode-byte-array: Private ordinary functions
decode-cons: Private ordinary functions
decode-map: Private ordinary functions
decode-rational: Private ordinary functions
decode-stream: Public ordinary functions
decode-string: Private ordinary functions
decode-symbol: Private ordinary functions
decode-symbol-as-number: Private ordinary functions
decode-with: Private generic functions
decode-with: Private generic functions
define-extension-types: Public ordinary functions

E
encodable-as-integer: Private ordinary functions
encode: Public ordinary functions
encode-array: Private ordinary functions
encode-cons: Private ordinary functions
encode-each: Private ordinary functions
encode-float: Private ordinary functions
encode-hash: Private ordinary functions
encode-integer: Private ordinary functions
encode-rational: Private ordinary functions
encode-raw-bytes: Private ordinary functions
encode-sequence-length: Private ordinary functions
encode-stream: Public ordinary functions
encode-string: Private ordinary functions
encode-symbol: Private ordinary functions
encode-with: Private generic functions
encode-with: Private generic functions
extension-type-id: Private generic functions
extension-type-id: Private generic functions

F
Function, alistp: Private ordinary functions
Function, decode: Public ordinary functions
Function, decode-array: Private ordinary functions
Function, decode-byte-array: Private ordinary functions
Function, decode-cons: Private ordinary functions
Function, decode-map: Private ordinary functions
Function, decode-rational: Private ordinary functions
Function, decode-stream: Public ordinary functions
Function, decode-string: Private ordinary functions
Function, decode-symbol: Private ordinary functions
Function, decode-symbol-as-number: Private ordinary functions
Function, define-extension-types: Public ordinary functions
Function, encodable-as-integer: Private ordinary functions
Function, encode: Public ordinary functions
Function, encode-array: Private ordinary functions
Function, encode-cons: Private ordinary functions
Function, encode-each: Private ordinary functions
Function, encode-float: Private ordinary functions
Function, encode-hash: Private ordinary functions
Function, encode-integer: Private ordinary functions
Function, encode-rational: Private ordinary functions
Function, encode-raw-bytes: Private ordinary functions
Function, encode-sequence-length: Private ordinary functions
Function, encode-stream: Public ordinary functions
Function, encode-string: Private ordinary functions
Function, encode-symbol: Private ordinary functions
Function, get-symbol-int-table: Public ordinary functions
Function, is-byte-array: Private ordinary functions
Function, lookup-table-find: Private ordinary functions
Function, lookup-table-insert: Private ordinary functions
Function, make-hash: Private ordinary functions
Function, make-lookup-table: Public ordinary functions
Function, mkstr: Private ordinary functions
Function, mksymb: Private ordinary functions
Function, parse-big-endian: Private ordinary functions
Function, plistp: Private ordinary functions
Function, pure-cons: Private ordinary functions
Function, sb16->ub16: Private ordinary functions
Function, sb32->ub32: Private ordinary functions
Function, sb64->ub64: Private ordinary functions
Function, sb8->ub8: Private ordinary functions
Function, sbcl-encode-float: Private ordinary functions
Function, speed-for-size: Private ordinary functions
Function, symbol-to-extension-type: Public ordinary functions
Function, try-encode-ext-type: Private ordinary functions
Function, typed-data: Private ordinary functions
Function, ub16->sb16: Private ordinary functions
Function, ub32->sb32: Private ordinary functions
Function, ub64->sb64: Private ordinary functions
Function, ub8->sb8: Private ordinary functions
Function, write-hex: Public ordinary functions

G
Generic Function, (setf as-numeric): Private generic functions
Generic Function, (setf decode-with): Private generic functions
Generic Function, (setf encode-with): Private generic functions
Generic Function, (setf extension-type-id): Private generic functions
Generic Function, (setf reg-class): Private generic functions
Generic Function, (setf type-number): Private generic functions
Generic Function, as-numeric: Private generic functions
Generic Function, decode-with: Private generic functions
Generic Function, encode-with: Private generic functions
Generic Function, extension-type-id: Private generic functions
Generic Function, reg-class: Private generic functions
Generic Function, type-number: Private generic functions
get-symbol-int-table: Public ordinary functions

I
is-byte-array: Private ordinary functions

L
load-big-endian: Private macros
lookup-table-find: Private ordinary functions
lookup-table-insert: Private ordinary functions

M
Macro, load-big-endian: Private macros
Macro, signed-unsigned-convertors: Private macros
Macro, store-big-endian: Private macros
Macro, with-symbol-int-table: Public macros
make-hash: Private ordinary functions
make-lookup-table: Public ordinary functions
Method, (setf as-numeric): Private generic functions
Method, (setf decode-with): Private generic functions
Method, (setf encode-with): Private generic functions
Method, (setf extension-type-id): Private generic functions
Method, (setf reg-class): Private generic functions
Method, (setf type-number): Private generic functions
Method, as-numeric: Private generic functions
Method, decode-with: Private generic functions
Method, encode-with: Private generic functions
Method, extension-type-id: Private generic functions
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, reg-class: Private generic functions
Method, shared-initialize: Public standalone methods
Method, type-number: Private generic functions
mkstr: Private ordinary functions
mksymb: Private ordinary functions

P
parse-big-endian: Private ordinary functions
plistp: Private ordinary functions
print-object: Public standalone methods
print-object: Public standalone methods
pure-cons: Private ordinary functions

R
reg-class: Private generic functions
reg-class: Private generic functions

S
sb16->ub16: Private ordinary functions
sb32->ub32: Private ordinary functions
sb64->ub64: Private ordinary functions
sb8->ub8: Private ordinary functions
sbcl-encode-float: Private ordinary functions
shared-initialize: Public standalone methods
signed-unsigned-convertors: Private macros
speed-for-size: Private ordinary functions
store-big-endian: Private macros
symbol-to-extension-type: Public ordinary functions

T
try-encode-ext-type: Private ordinary functions
type-number: Private generic functions
type-number: Private generic functions
typed-data: Private ordinary functions

U
ub16->sb16: Private ordinary functions
ub32->sb32: Private ordinary functions
ub64->sb64: Private ordinary functions
ub8->sb8: Private ordinary functions

W
with-symbol-int-table: Public macros
write-hex: Public ordinary functions


A.3 Variables

Jump to:   *  
A   D   E   I   R   S   T  
Index Entry  Section

*
*decode-bin-as-string*: Public special variables
*decoder-prefers-alists*: Public special variables
*decoder-prefers-lists*: Public special variables
*encode-alist-as-map*: Public special variables
*extended-types*: Public special variables
*int->symbol*: Public special variables
*lookup-table*: Public special variables
*symbol->int*: Public special variables
*use-false*: Private special variables
*use-null*: Public special variables

A
as-numeric: Private classes

D
decode-with: Private classes

E
encode-with: Private classes

I
id: Public classes

R
reg-class: Private classes

S
Slot, as-numeric: Private classes
Slot, decode-with: Private classes
Slot, encode-with: Private classes
Slot, id: Public classes
Slot, reg-class: Private classes
Slot, type-number: Private classes
Special Variable, *decode-bin-as-string*: Public special variables
Special Variable, *decoder-prefers-alists*: Public special variables
Special Variable, *decoder-prefers-lists*: Public special variables
Special Variable, *encode-alist-as-map*: Public special variables
Special Variable, *extended-types*: Public special variables
Special Variable, *int->symbol*: Public special variables
Special Variable, *lookup-table*: Public special variables
Special Variable, *symbol->int*: Public special variables
Special Variable, *use-false*: Private special variables
Special Variable, *use-null*: Public special variables

T
type-number: Private classes