This is the darts.lib.message-pack Reference Manual, version 0.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Sep 15 04:56:57 2024 GMT+0.
The main system appears first, followed by any subsystem dependency.
darts.lib.message-pack
Implementation of the message pack exchange format
Dirk Esser
Dirk Esser
MIT
0.1
ieee-floats
(system).
babel
(system).
package.lisp
(file).
msgpack.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
darts.lib.message-pack/darts.lib.message-pack.asd
darts.lib.message-pack/package.lisp
darts.lib.message-pack/msgpack.lisp
darts.lib.message-pack/darts.lib.message-pack.asd
darts.lib.message-pack
(system).
darts.lib.message-pack/package.lisp
darts.lib.message-pack
(system).
darts.lib.message-pack/msgpack.lisp
package.lisp
(file).
darts.lib.message-pack
(system).
invalid-tag-byte-error
(condition).
premature-end-of-input-error
(condition).
protocol-error
(condition).
protocol-error-byte
(reader method).
protocol-error-stream
(function).
read-packed-octet-array-data
(function).
read-packed-string-data
(function).
read-packed-value
(function).
read-packed-value-or-header
(function).
unencodable-object-error
(function).
unencodable-object-error
(condition).
unencodable-object-error-datum
(reader method).
unencodable-object-error-message
(reader method).
unencodable-object-error-reason
(reader method).
write-packed-array-header
(function).
write-packed-boolean
(function).
write-packed-double-float
(function).
write-packed-extension-header
(function).
write-packed-integer
(function).
write-packed-map-header
(function).
write-packed-null
(function).
write-packed-octet-array
(function).
write-packed-octet-array-header
(function).
write-packed-single-float
(function).
write-packed-string
(function).
define-encoder
(macro).
octet
(type).
octet-buffer
(type).
Packages are listed by definition order.
darts.lib.message-pack
A simple implementation of the message pack binary data encoding format. All value families are supported.
babel
.
common-lisp
.
ieee-floats
.
invalid-tag-byte-error
(condition).
premature-end-of-input-error
(condition).
protocol-error
(condition).
protocol-error-byte
(generic reader).
protocol-error-stream
(function).
read-packed-octet-array-data
(function).
read-packed-string-data
(function).
read-packed-value
(function).
read-packed-value-or-header
(function).
unencodable-object-error
(function).
unencodable-object-error
(condition).
unencodable-object-error-datum
(generic reader).
unencodable-object-error-message
(generic reader).
unencodable-object-error-reason
(generic reader).
write-packed-array-header
(function).
write-packed-boolean
(function).
write-packed-double-float
(function).
write-packed-extension-header
(function).
write-packed-integer
(function).
write-packed-map-header
(function).
write-packed-null
(function).
write-packed-octet-array
(function).
write-packed-octet-array-header
(function).
write-packed-single-float
(function).
write-packed-string
(function).
define-encoder
(macro).
octet
(type).
octet-buffer
(type).
Definitions are sorted by export status, category, package, and then by lexicographic order.
The function reads the next ‘length’ bytes from ‘stream’ and
returns the result as an ‘(array octet (length))’. It makes sure,
that all required data is available, and signals a ‘premature-end-of-input-error’,
if the end of the stream is reached before all data could be read.
Reads the next ‘length’ bytes from ‘stream’, and decodes it into a proper string, assuming, that the data was encoded using the given ‘encoding’ (which defaults to ‘*default-character-encoding*’). The length of the string returned by this function depends on the encoding and the actual string data.
Reads the next available value from ‘stream’, and returns two value, namely ‘object’ and ‘type’, where ‘object’ is the value read, and ‘type’ is a symbol indicating the value family of ‘object’ (so that the caller can distiguish between ‘null’ and ‘boolean’, for example).
Strings are assumed to be encoded using ‘encoding’, which defaults to
the value of ‘*default-character-encoding*’.
The value of ‘map-reader’ determines, how map objects are read.
Possible values are:
- ‘:alist’ (read maps as association lists, this is the default)
- ‘:plist’ (read maps as property lists)
- ‘:hash’ (read maps as hash tables with test ‘equal’)
- a function (lambda (length stream) ...), which is called in order
to decode the actual map contents.
The value of ‘array-reader’ determines, how general arrays are read.
Possible values are:
- ‘:vector’ (read into a newly allocated simple vector, default)
- ‘:list’ (read into a list)
- a function (lambda (length stream) ...), which is called in order
to decode the actual array contents.
The value of ‘extension-reader’ determines, how extension records
are read. Possible values are:
- ‘:buffer’ (read the data into a byte array, and yield a pair of
type tag and the buffered data; this is the default)
- a function (lambda (type length stream) ...), which is called in
order to decode the actual record contents.
If ‘accept-eof’, the function explicitly checks for EOF before the first read operation, and if the end of ‘stream’ has indeed been reached, it returns the values ‘default’ as ‘object’ and nil as ‘type’. Note, that this applies only to the first read operation; subsequent read operations (if they are necessary), will not be guarded this way.
Reads the next available value from ‘stream’. This function returns
three values: ‘data’, ‘type’, ‘info’.
The value of ‘type’ is always a symbol, which represents the type
of object. It may be one of:
- nil, if the end of the input stream has been reached; ‘data’ is
nil in this case, and ‘info’ is nil, too.
- :integer, if the value read was an integer number; ‘data’ is the
numeric value, and ‘info’ is nil in this case.
- :number, if the value read was a floating point number; ‘data’ is
the numeric value in this case, and ‘info’ is nil.
- :boolean, if the value read was a boolean value; ‘data’ is the
actual truth value (t or nil), and ‘info’ is nil in this case.
- :null, if the null value marker has been read; ‘data’ is nil in
this case, and so is ‘info’.
- :string-header, if the beginning of a string was detected. The
value of ‘data’ is the length in bytes of the encoded string, and
‘info’ is nil. The caller is responsible for extracting the actual
contents of the string from ‘stream’.
- :map-header, if the beginning of a map was detected. The value of
‘data’ is the length of the map (i.e., the number of key/value pairs).
The value of ‘info’ is nil. The caller is responsible for extracting
the actual contents of the map from ‘stream’.
- :array-header, if the beginning of a general array was detected;
the value of ‘data’ is the length of the array (i.e., the number of
elements). The value of ‘info’ is nil. The caller is responsible for
extracting the contents from ‘stream’.
- :octet-array-header, if the beginning of a byte array was detected;
the value of ‘data’ is the length of the array (i.e., the number of
bytes). The value of ‘info’ is nil. The caller is responsible for
extracting the contents from ‘stream’.
- :extension-header, if the beginning of an extension record was detected; the value of ‘data’ is the length (in bytes) of the record, and ‘info’ is the type tag (a small integer).
Encodes the start of a general array of the given ‘length’ and writes
the result into ‘stream’. The caller is responsible for writing the actual
data immediately after the header written by this function.
This function returns ‘length’.
Encodes ‘value’ as a boolean value, writing the result into ‘stream’. This function returns ‘value’.
Encodes the floating point number ‘value’ as IEEE 745 double-precision (64 bit) number, and writes the result into ‘stream’. It returns ‘value’. Note, that if a conversion of ‘value’ is necessary, this encoder may lose information.
Encodes the start of an extension section with a payload size of ‘length’
and a type tag value of ‘type’, and writes the result into ‘stream’. The
caller is responsible for writing the actual data immediately after the
header written by this function.
This function returns ‘type’.
Encodes the integer number ‘value’ and writes the result into ‘stream’. Note, that ‘value’ must either be of type ‘(signed-byte 64)’ or ‘(unsigned-byte 64)’; this is a restriction of the message pack protocol. The function returns ‘value’.
Encodes the start of a map containing ‘length’ pairs and writes
the result into ‘stream’. The caller is responsible for writing the actual
data immediately after the header written by this function.
This function returns ‘length’.
Writes a placeholder value representing ‘null’ into the given ‘stream’. This function returns nil.
Encodes the array of bytes ‘value’, and writes the result into the
given ‘stream’.
If ‘start’ is supplied, it represents the index of the first element
in ‘value’, which should be included in the result (defaults to 0). If
‘end’ is supplied, it represents the end of the portion of ‘value’ to
encode; if omitted or nil, it defaults to the length of ‘value’.
This function returns ‘value’.
Encodes the start of an array of bytes of the given ‘length’ and writes
the result into ‘stream’. The caller is responsible for writing the actual
data immediately after the header written by this function.
This function returns ‘length’.
Encodes the floating point number ‘value’ as IEEE 745 single-precision (32 bit) number, and writes the result into ‘stream’. It returns ‘value’. Note, that if a conversion of ‘value’ is necessary, this encoder may lose information.
Encodes the string ‘value’ and writes the result into ‘stream’. The
characters are transformed into bytes using the given ‘encoding’, which
defaults to the value of ‘*default-character-encoding*’.
If ‘start’ is supplied, it represents the index of the first character
in ‘value’, which should be included in the result (defaults to 0). If
‘end’ is supplied, it represents the end of the portion of ‘value’ to
encode; if omitted or nil, it defaults to the length of ‘value’.
This function returns ‘value’.
invalid-tag-byte-error
)) ¶byte
.
unencodable-object-error
)) ¶unencodable-object-error
)) ¶unencodable-object-error
)) ¶protocol-error
.
stream-error
.
common-lisp
.
(quote nil)
:value
This slot is read-only.
end-of-file
.
protocol-error
.
Base class for conditions related to violations of the message pack protocol.
error
.
A condition of this type is signalled, if a given value cannot be encoded in the msgpack format.
error
.
(quote nil)
:datum
This slot is read-only.
(quote nil)
:reason
This slot is read-only.
(quote nil)
:message
This slot is read-only.
Jump to: | D F G M P R U W |
---|
Jump to: | D F G M P R U W |
---|
Jump to: | B D M R S |
---|
Index Entry | Section | ||
---|---|---|---|
| |||
B | |||
byte : | Public conditions | ||
| |||
D | |||
datum : | Public conditions | ||
| |||
M | |||
message : | Public conditions | ||
| |||
R | |||
reason : | Public conditions | ||
| |||
S | |||
Slot, byte : | Public conditions | ||
Slot, datum : | Public conditions | ||
Slot, message : | Public conditions | ||
Slot, reason : | Public conditions | ||
|
Jump to: | B D M R S |
---|
Jump to: | C D F I M O P S T U |
---|
Jump to: | C D F I M O P S T U |
---|