This is the binary-types Reference Manual, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 04:24:19 2024 GMT+0.
The main system appears first, followed by any subsystem dependency.
binary-types
A library for reading and writing binary records.
Frode V. Fjeld
BSD-like, see accopanying file COPYING.
binary-types.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
binary-types/binary-types.asd
binary-types
(system).
binary-types/binary-types.lisp
binary-types
(system).
*binary-read-byte*
(special variable).
*binary-write-byte*
(special variable).
*endian*
(special variable).
*padding-byte*
(special variable).
binary-record-slot-names
(function).
binary-slot-tags
(function).
binary-slot-type
(function).
binary-slot-value
(function).
char8
(type).
define-binary-class
(macro).
define-binary-string
(macro).
define-binary-struct
(macro).
define-bitfield
(macro).
define-enum
(macro).
define-null-terminated-string
(macro).
define-signed
(macro).
define-unsigned
(macro).
endianess
(type).
enum-symbolic-value
(function).
enum-value
(function).
find-binary-type
(function).
(setf find-binary-type)
(function).
make-load-form
(method).
merge-bytes
(function).
print-object
(method).
print-object
(method).
read-binary
(generic function).
read-binary-record
(method).
read-binary-string
(function).
s128
(type).
s16
(type).
s256
(type).
s32
(type).
s64
(type).
s8
(type).
sizeof
(generic function).
slot-offset
(function).
split-bytes
(function).
u128
(type).
u16
(type).
u256
(type).
u32
(type).
u64
(type).
u8
(type).
with-binary-file
(macro).
with-binary-input-from-list
(macro).
with-binary-input-from-vector
(macro).
with-binary-output-to-list
(macro).
with-binary-output-to-vector
(macro).
write-binary
(generic function).
write-binary-record
(method).
*binary-type-namespace*
(special variable).
*ignore-hidden-slots-for-pcl*
(special variable).
binary-char8
(class).
binary-class
(class).
binary-integer
(class).
binary-integer-endian
(reader method).
binary-record
(class).
binary-record-alist
(function).
binary-record-make-instance
(method).
binary-record-make-instance
(method).
binary-record-slot-offset
(reader method).
binary-record-slots
(reader method).
(setf binary-record-slots)
(writer method).
binary-signed
(class).
binary-string
(class).
binary-string-terminators
(reader method).
binary-struct
(class).
binary-type
(class).
binary-type-name
(reader method).
binary-unsigned
(class).
bitfield
(class).
bitfield-compute-numeric-value
(function).
bitfield-compute-symbolic-value
(function).
bitfield-entry
(structure).
bitfield-entry-bytespec
(reader).
(setf bitfield-entry-bytespec)
(writer).
bitfield-entry-p
(function).
bitfield-entry-value
(reader).
(setf bitfield-entry-value)
(writer).
bitfield-hash
(reader method).
(setf bitfield-hash)
(writer method).
calculate-sizeof
(function).
copy-bitfield-entry
(function).
copy-record-slot
(function).
define-fixed-size-nt-string
(macro).
find-binary-type-name
(function).
make-bitfield-entry
(function).
make-pairs
(function).
make-record-slot
(function).
merge-binary-records
(function).
parse-bt-spec
(function).
quoted-name-p
(function).
record-slot
(structure).
record-slot-hidden-read-slot
(reader).
(setf record-slot-hidden-read-slot)
(writer).
record-slot-map-read
(reader).
(setf record-slot-map-read)
(writer).
record-slot-map-read-delayed
(reader).
(setf record-slot-map-read-delayed)
(writer).
record-slot-map-write
(reader).
(setf record-slot-map-write)
(writer).
record-slot-name
(reader).
(setf record-slot-name)
(writer).
record-slot-p
(function).
record-slot-tags
(reader).
(setf record-slot-tags)
(writer).
record-slot-type
(reader).
(setf record-slot-type)
(writer).
storage-type
(reader method).
(setf storage-type)
(writer method).
Packages are listed by definition order.
binary-types
common-lisp
.
*binary-read-byte*
(special variable).
*binary-write-byte*
(special variable).
*endian*
(special variable).
*padding-byte*
(special variable).
binary-record-slot-names
(function).
binary-slot-tags
(function).
binary-slot-type
(function).
binary-slot-value
(function).
char8
(type).
define-binary-class
(macro).
define-binary-string
(macro).
define-binary-struct
(macro).
define-bitfield
(macro).
define-enum
(macro).
define-null-terminated-string
(macro).
define-signed
(macro).
define-unsigned
(macro).
endianess
(type).
enum-symbolic-value
(function).
enum-value
(function).
find-binary-type
(function).
(setf find-binary-type)
(function).
merge-bytes
(function).
read-binary
(generic function).
read-binary-record
(generic function).
read-binary-string
(function).
s128
(type).
s16
(type).
s256
(type).
s32
(type).
s64
(type).
s8
(type).
sizeof
(generic function).
slot-offset
(function).
split-bytes
(function).
u128
(type).
u16
(type).
u256
(type).
u32
(type).
u64
(type).
u8
(type).
with-binary-file
(macro).
with-binary-input-from-list
(macro).
with-binary-input-from-vector
(macro).
with-binary-output-to-list
(macro).
with-binary-output-to-vector
(macro).
write-binary
(generic function).
write-binary-record
(generic function).
*binary-type-namespace*
(special variable).
*ignore-hidden-slots-for-pcl*
(special variable).
binary-char8
(class).
binary-class
(class).
binary-integer
(class).
binary-integer-endian
(generic reader).
binary-record
(class).
binary-record-alist
(function).
binary-record-make-instance
(generic function).
binary-record-slot-offset
(generic reader).
binary-record-slots
(generic reader).
(setf binary-record-slots)
(generic writer).
binary-signed
(class).
binary-string
(class).
binary-string-terminators
(generic reader).
binary-struct
(class).
binary-type
(class).
binary-type-name
(generic reader).
binary-unsigned
(class).
bitfield
(class).
bitfield-compute-numeric-value
(function).
bitfield-compute-symbolic-value
(function).
bitfield-entry
(structure).
bitfield-entry-bytespec
(reader).
(setf bitfield-entry-bytespec)
(writer).
bitfield-entry-p
(function).
bitfield-entry-value
(reader).
(setf bitfield-entry-value)
(writer).
bitfield-hash
(generic reader).
(setf bitfield-hash)
(generic writer).
calculate-sizeof
(function).
copy-bitfield-entry
(function).
copy-record-slot
(function).
define-fixed-size-nt-string
(macro).
find-binary-type-name
(function).
make-bitfield-entry
(function).
make-pairs
(function).
make-record-slot
(function).
merge-binary-records
(function).
parse-bt-spec
(function).
quoted-name-p
(function).
record-slot
(structure).
record-slot-hidden-read-slot
(reader).
(setf record-slot-hidden-read-slot)
(writer).
record-slot-map-read
(reader).
(setf record-slot-map-read)
(writer).
record-slot-map-read-delayed
(reader).
(setf record-slot-map-read-delayed)
(writer).
record-slot-map-write
(reader).
(setf record-slot-map-write)
(writer).
record-slot-name
(reader).
(setf record-slot-name)
(writer).
record-slot-p
(function).
record-slot-tags
(reader).
(setf record-slot-tags)
(writer).
record-slot-type
(reader).
(setf record-slot-type)
(writer).
storage-type
(generic reader).
(setf storage-type)
(generic writer).
Definitions are sorted by export status, category, package, and then by lexicographic order.
The low-level READ-BYTE function used by binary-types.
The low-level WRITE-BYTE function used by binary-types.
*endian* must be (dynamically) bound to either :big-endian or :little-endian while reading endian-sensitive types.
The value written to padding octets.
A simple wrapper around DEFINE-BITFIELD for simple enum types.
This is a thin wrapper around WITH-OPEN-FILE, that tries to set the stream’s element-type to that required by READ-BINARY and WRITE-BINARY. A run-time assertion on the stream’s actual element type is performed, unless you disable this feature by setting the keyword option :check-stream to nil.
Bind STREAM-VAR to an object that, when passed to READ-BINARY, provides
8-bit bytes from LIST-FORM, which must yield a list.
Binds *BINARY-READ-BYTE* appropriately. This macro will break if this
binding is shadowed.
Bind STREAM-VAR to an object that, when passed to READ-BINARY, provides
8-bit bytes from VECTOR-FORM, which must yield a vector.
Binds *BINARY-READ-BYTE* appropriately. This macro will break if this
binding is shadowed.
Inside BODY, calls to WRITE-BINARY with stream STREAM-VAR will
collect the individual 8-bit bytes in a list (of integers).
This list is returned by the form. (There is no way to get at
the return-value of BODY.)
This macro depends on the binding of *BINARY-WRITE-BYTE*, which should
not be shadowed.
Arrange for STREAM-VAR to collect octets in a vector.
VECTOR-OR-SIZE-FORM is either a form that evaluates to a vector, or an
integer in which case a new vector of that size is created. The vector’s
fill-pointer is used as the write-index. If ADJUSTABLE nil (or not provided),
an error will occur if the array is too small. Otherwise, the array will
be adjusted in size, using VECTOR-PUSH-EXTEND. If ADJUSTABLE is an integer,
that value will be passed as the EXTENSION argument to VECTOR-PUSH-EXTEND.
If VECTOR-OR-SIZE-FORM is an integer, the created vector is returned,
otherwise the value of BODY.
Returns a list of the slot-names of TYPE, in sequence.
Return the “binary” value of a slot, i.e the value mapped by any MAP-ON-WRITE slot mapper function.
The inverse of ENUM-VALUE.
For an enum type (actually, for any bitfield-based type), ~ look up the numeric value of a symbol.
Combine BYTES sized FROM-SIZE bits into new bytes sized TO-SIZE bits.
Read a string from STREAM, terminated by any member of the list TERMINATORS. If SIZE is provided and non-nil, exactly SIZE octets are read, but the returned string is still terminated by TERMINATORS. The string and the number of octets read are returned.
Return the offset (in number of octets) of SLOT-NAME in TYPE.
From a list of BYTES sized FROM-SIZE bits, split each byte into bytes of size TO-SIZE, according to *ENDIAN*. TO-SIZE must divide FROM-SIZE evenly. If this is not the case, you might want to apply MERGE-BYTES to the list of BYTES first.
Read an object of binary TYPE from STREAM.
binary-record
) stream &key start stop &allow-other-keys) ¶binary-string
) stream &key &allow-other-keys) ¶integer
) stream &key &allow-other-keys) ¶binary-char8
) stream &key &allow-other-keys) ¶binary-signed
) stream &key &allow-other-keys) ¶binary-unsigned
) stream &key &allow-other-keys) ¶symbol
) stream &rest key-args) ¶Return the size in octets of the single argument TYPE, or nil if TYPE is not constant-sized.
integer
)) ¶binary-type
)) ¶automatically generated reader method
symbol
)) ¶Write an OBJECT of TYPE to STREAM.
binary-record
) stream object &key start stop &allow-other-keys) ¶binary-string
) stream obj &key &allow-other-keys) ¶integer
) stream object &key &allow-other-keys) ¶binary-char8
) stream object &key &allow-other-keys) ¶binary-integer
) stream object &key &allow-other-keys) ¶symbol
) stream object &rest key-args) ¶record-slot
) &optional environment) ¶binary-integer
) stream) ¶binary-type
) stream) ¶These are the legal declarations of endianess. The value NIL
means that the endianess is determined by the dynamic value of *endian*.
Maps binary type’s names (which are symbols) to their binary-type class object.
Really ugly hack to allow older PCL-infested lisps to work in the precense of :map-binary-read-delayed.
Returns an assoc-list representation of (the slots of) a binary record object.
Returns the numeric representation of a bitfields symbolic value.
Return the symbolic value of a numeric bitfield
(make-pairs ’(1 2 3 4)) => ((1 . 2) (3 . 4))
Returns a record where every non-bound slot in obj1 is replaced with that slot’s value from obj2.
Takes a binary-type specifier (a symbol, integer, or define-xx form),
and returns three values: the binary-type’s name, the equivalent lisp type,
and any nested declaration that must be expanded separately.
name
.
tags
.
type
.
binary-integer
)) ¶automatically generated reader method
binary-struct
)) ¶binary-class
)) ¶binary-record
)) ¶automatically generated reader method
binary-record
)) ¶automatically generated reader method
binary-record
)) ¶automatically generated writer method
binary-string
)) ¶automatically generated reader method
binary-type
)) ¶automatically generated reader method
name
.
structure-object
.
common-lisp
.
standard-class
binary-types::instance-class
binary-types:endianess
binary-types::endian
This slot is read-only.
binary-types::terminators
This slot is read-only.
binary-types::constructor
BINARY-TYPE is the base class for binary types meta-classes.
(quote #:anonymous-binary-type)
binary-types::name
This slot is read-only.
Jump to: | (
B C D E F G M P Q R S W |
---|
Jump to: | (
B C D E F G M P Q R S W |
---|
Jump to: | *
B C E H I M N O S T V |
---|
Jump to: | *
B C E H I M N O S T V |
---|
Jump to: | B C E F P R S T U |
---|
Jump to: | B C E F P R S T U |
---|