The pack Reference Manual

This is the pack Reference Manual, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Sep 15 06:17:34 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

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


2.1 pack

Pack and unpack binary data via Python-like struct strings.

Author

Death

License

Public Domain

Dependencies
  • alexandria (system).
  • ieee-floats (system).
Source

pack.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 pack/pack.asd

Source

pack.asd.

Parent Component

pack (system).

ASDF Systems

pack.


3.1.2 pack/package.lisp

Source

pack.asd.

Parent Component

pack (system).

Packages

pack.


3.1.3 pack/pack.lisp

Dependency

package.lisp (file).

Source

pack.asd.

Parent Component

pack (system).

Public Interface
Internals

4 Packages

Packages are listed by definition order.


4.1 pack

Source

package.lisp.

Use List
  • alexandria.
  • common-lisp.
  • ieee-floats.
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 Compiler macros

Compiler Macro: calc-size (string)
Package

pack.

Source

pack.lisp.

Compiler Macro: pack (string &rest args)
Package

pack.

Source

pack.lisp.

Compiler Macro: pack-into (string stream &rest args)
Package

pack.

Source

pack.lisp.

Compiler Macro: unpack (string stream)
Package

pack.

Source

pack.lisp.


5.1.2 Ordinary functions

Function: calc-size (string)
Package

pack.

Source

pack.lisp.

Function: compile-struct-string (string)
Package

pack.

Source

pack.lisp.

Function: pack (string &rest args)
Package

pack.

Source

pack.lisp.

Function: pack* (compiled stream &rest args)
Package

pack.

Source

pack.lisp.

Function: pack-into (string stream &rest args)
Package

pack.

Source

pack.lisp.

Function: unpack (string stream)
Package

pack.

Source

pack.lisp.

Function: unpack* (compiled stream)
Package

pack.

Source

pack.lisp.


5.1.3 Generic functions

Generic Function: struct-stream-protocol (stream)
Package

pack.

Source

pack.lisp.

Methods
Method: struct-stream-protocol ((vector vector))
Method: struct-stream-protocol ((stream stream))

5.2 Internals


5.2.1 Special variables

Special Variable: *offset*
Package

pack.

Source

pack.lisp.

Special Variable: *pack-args*
Package

pack.

Source

pack.lisp.

Special Variable: *reader*
Package

pack.

Source

pack.lisp.

Special Variable: *writer*
Package

pack.

Source

pack.lisp.


5.2.2 Macros

Macro: read-signed-be (size)
Package

pack.

Source

pack.lisp.

Macro: read-signed-le (size)
Package

pack.

Source

pack.lisp.

Macro: read-unsigned-be (size)
Package

pack.

Source

pack.lisp.

Macro: read-unsigned-le (size)
Package

pack.

Source

pack.lisp.

Macro: write-signed-be (value size)
Package

pack.

Source

pack.lisp.

Macro: write-signed-le (value size)
Package

pack.

Source

pack.lisp.

Macro: write-unsigned-be (value size)
Package

pack.

Source

pack.lisp.

Macro: write-unsigned-le (value size)
Package

pack.

Source

pack.lisp.


5.2.3 Ordinary functions

Function: bool-to-byte (bool)
Package

pack.

Source

pack.lisp.

Function: byte-to-bool (byte)
Package

pack.

Source

pack.lisp.

Function: byte-to-char (char-or-byte)
Package

pack.

Source

pack.lisp.

Function: char-to-byte (char-or-byte)
Package

pack.

Source

pack.lisp.

Function: divisible-by-p (n d)
Package

pack.

Source

pack.lisp.

Function: offset ()
Package

pack.

Source

pack.lisp.

Function: (setf offset) ()
Package

pack.

Source

pack.lisp.

Function: pack-arg ()
Package

pack.

Source

pack.lisp.

Function: read-double-be ()
Package

pack.

Source

pack.lisp.

Function: read-double-le ()
Package

pack.

Source

pack.lisp.

Function: read-fixlen-string (size)
Package

pack.

Source

pack.lisp.

Function: read-float-be ()
Package

pack.

Source

pack.lisp.

Function: read-float-le ()
Package

pack.

Source

pack.lisp.

Function: read-octet ()
Package

pack.

Source

pack.lisp.

Function: read-pad (size)
Package

pack.

Source

pack.lisp.

Function: read-pascal-string (size)
Package

pack.

Source

pack.lisp.

Function: signed-to-unsigned (value size)
Package

pack.

Source

pack.lisp.

Function: unsigned-to-signed (value size)
Package

pack.

Source

pack.lisp.

Function: write-double-be (value)
Package

pack.

Source

pack.lisp.

Function: write-double-le (value)
Package

pack.

Source

pack.lisp.

Function: write-fixlen-string (value size)
Package

pack.

Source

pack.lisp.

Function: write-float-be (value)
Package

pack.

Source

pack.lisp.

Function: write-float-le (value)
Package

pack.

Source

pack.lisp.

Function: write-octet (octet)
Package

pack.

Source

pack.lisp.

Function: write-pad (size)
Package

pack.

Source

pack.lisp.

Function: write-pascal-string (value size)
Package

pack.

Source

pack.lisp.


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   (  
B   C   D   F   G   M   O   P   R   S   U   W  
Index Entry  Section

(
(setf offset): Private ordinary functions

B
bool-to-byte: Private ordinary functions
byte-to-bool: Private ordinary functions
byte-to-char: Private ordinary functions

C
calc-size: Public compiler macros
calc-size: Public ordinary functions
char-to-byte: Private ordinary functions
compile-struct-string: Public ordinary functions
Compiler Macro, calc-size: Public compiler macros
Compiler Macro, pack: Public compiler macros
Compiler Macro, pack-into: Public compiler macros
Compiler Macro, unpack: Public compiler macros

D
divisible-by-p: Private ordinary functions

F
Function, (setf offset): Private ordinary functions
Function, bool-to-byte: Private ordinary functions
Function, byte-to-bool: Private ordinary functions
Function, byte-to-char: Private ordinary functions
Function, calc-size: Public ordinary functions
Function, char-to-byte: Private ordinary functions
Function, compile-struct-string: Public ordinary functions
Function, divisible-by-p: Private ordinary functions
Function, offset: Private ordinary functions
Function, pack: Public ordinary functions
Function, pack*: Public ordinary functions
Function, pack-arg: Private ordinary functions
Function, pack-into: Public ordinary functions
Function, read-double-be: Private ordinary functions
Function, read-double-le: Private ordinary functions
Function, read-fixlen-string: Private ordinary functions
Function, read-float-be: Private ordinary functions
Function, read-float-le: Private ordinary functions
Function, read-octet: Private ordinary functions
Function, read-pad: Private ordinary functions
Function, read-pascal-string: Private ordinary functions
Function, signed-to-unsigned: Private ordinary functions
Function, unpack: Public ordinary functions
Function, unpack*: Public ordinary functions
Function, unsigned-to-signed: Private ordinary functions
Function, write-double-be: Private ordinary functions
Function, write-double-le: Private ordinary functions
Function, write-fixlen-string: Private ordinary functions
Function, write-float-be: Private ordinary functions
Function, write-float-le: Private ordinary functions
Function, write-octet: Private ordinary functions
Function, write-pad: Private ordinary functions
Function, write-pascal-string: Private ordinary functions

G
Generic Function, struct-stream-protocol: Public generic functions

M
Macro, read-signed-be: Private macros
Macro, read-signed-le: Private macros
Macro, read-unsigned-be: Private macros
Macro, read-unsigned-le: Private macros
Macro, write-signed-be: Private macros
Macro, write-signed-le: Private macros
Macro, write-unsigned-be: Private macros
Macro, write-unsigned-le: Private macros
Method, struct-stream-protocol: Public generic functions
Method, struct-stream-protocol: Public generic functions

O
offset: Private ordinary functions

P
pack: Public compiler macros
pack: Public ordinary functions
pack*: Public ordinary functions
pack-arg: Private ordinary functions
pack-into: Public compiler macros
pack-into: Public ordinary functions

R
read-double-be: Private ordinary functions
read-double-le: Private ordinary functions
read-fixlen-string: Private ordinary functions
read-float-be: Private ordinary functions
read-float-le: Private ordinary functions
read-octet: Private ordinary functions
read-pad: Private ordinary functions
read-pascal-string: Private ordinary functions
read-signed-be: Private macros
read-signed-le: Private macros
read-unsigned-be: Private macros
read-unsigned-le: Private macros

S
signed-to-unsigned: Private ordinary functions
struct-stream-protocol: Public generic functions
struct-stream-protocol: Public generic functions
struct-stream-protocol: Public generic functions

U
unpack: Public compiler macros
unpack: Public ordinary functions
unpack*: Public ordinary functions
unsigned-to-signed: Private ordinary functions

W
write-double-be: Private ordinary functions
write-double-le: Private ordinary functions
write-fixlen-string: Private ordinary functions
write-float-be: Private ordinary functions
write-float-le: Private ordinary functions
write-octet: Private ordinary functions
write-pad: Private ordinary functions
write-pascal-string: Private ordinary functions
write-signed-be: Private macros
write-signed-le: Private macros
write-unsigned-be: Private macros
write-unsigned-le: Private macros