The plump-bundle Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The plump-bundle Reference Manual

This is the plump-bundle Reference Manual, version 0.1.0, generated automatically by Declt version 2.3 "Robert April" on Wed Mar 14 04:25:40 2018 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

About Plump-Bundle

This is an implementation and specification of a binary file format to store Plump documents.

How To

Storing happens through output, parsing through input.

(plump-bundle:input (plump-bundle:output :vector (plump:parse "<test>Hey!</test>")))

They both accept namestrings, pathnames, vectors (:vector for ouput), or a fast-io buffer. The format handles all node-types defined in Plump-DOM 1.2 .

Format Specification (v1)

The following primitive types are declared:

chunk     ::= type *
children  ::= count chunk{count}
map       ::= count pair{count}
pair      ::= string string
string    ::= count character{count}
type      ::= integer
count     ::= integer
character --- A character encoded in utf-8.
integer   --- Corresponds to (unsigned-byte 32), stored in big-endian.
byte      --- Corresponds to (unsigned-byte 8)

The file header looks as follows:

-------------------------------------------------------
POS HEX THING
-------------------------------------------------------
00  89  
01  50  ASCII P
02  4c  ASCII L
03  55  ASCII U
04  4d  ASCII M
05  50  ASCII P
06  0d  ASCII CR
07  0a  ASCII LF
08  1a  DOS EOF
09  0a  ASCII LF
0a  01  ASCII SOH
0b      1-byte version number
0c      4-byte timestamp
..      ..
10  02  ASCII STX
-------------------------------------------------------

Following the header is a single chunk. Chunks are generally composed of a type header, followed by the content as specified by the chunk type. The type header is given here in the form of four ASCII characters, which are then byte-composed into a single (unsigned-byte 32) integer.

-------------------------------------------------------
TYPE  LISP-TYPE               LAYOUT
-------------------------------------------------------
NULL  NULL                    type 
NODE  NODE                    type 
NEST  NESTING-NODE            type children
CHLD  CHILD-NODE              type
TXND  TEXTUAL-NODE            type string
ROOT  ROOT                    type children
TEXT  TEXT-NODE               type string
COMM  COMMENT                 type string
DOCT  DOCTYPE                 type string
ELEM  ELEMENT                 type string map children
FTXT  FULLTEXT-ELEMENT        type string map children
XMLH  XML-HEADER              type map
CDAT  CDATA                   type string
PROC  PROCESSING-INSTRUCTION  type string string
-------------------------------------------------------

The footer looks like so:

-------------------------------------------------------
POS HEX THING
-------------------------------------------------------
00  04  ASCII ETX
-------------------------------------------------------

Thus, a sample document as denoted in standard XML syntax

<start><foo bar="baz">Hello!</foo></start>

Is transformed into the following bundle (as displayed by Emacs' hexl-mode)

00000000: 8950 4c55 4d50 0d0a 1a0a 0101 d8a4 84c2  .PLUMP..........
00000010: 0252 4f4f 5400 0000 0145 4c45 4d00 0000  .ROOT....ELEM...
00000020: 0573 7461 7274 0000 0000 0000 0001 454c  .start........EL
00000030: 454d 0000 0003 666f 6f00 0000 0100 0000  EM....foo.......
00000040: 0362 6172 0000 0003 6261 7a00 0000 0154  .bar....baz....T
00000050: 4558 5400 0000 0648 656c 6c6f 2104       EXT....Hello!.

Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

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


Previous: , Up: Systems   [Contents][Index]

2.1 plump-bundle

Maintainer

Nicolas Hafner <shinmera@tymoon.eu>

Author

Nicolas Hafner <shinmera@tymoon.eu>

Home Page

https://github.com/Shinmera/plump-bundle

License

Artistic

Description

A binary storage format for Plump documents.

Version

0.1.0

Dependencies
Source

plump-bundle.asd (file)

Components

Next: , Previous: , Up: Top   [Contents][Index]

3 Files

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


Previous: , Up: Files   [Contents][Index]

3.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.1 plump-bundle.asd

Location

plump-bundle.asd

Systems

plump-bundle (system)


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.2 plump-bundle/package.lisp

Parent

plump-bundle (system)

Location

package.lisp

Packages

Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.3 plump-bundle/machinery.lisp

Dependency

package.lisp (file)

Parent

plump-bundle (system)

Location

machinery.lisp

Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.4 plump-bundle/definitions.lisp

Dependency

machinery.lisp (file)

Parent

plump-bundle (system)

Location

definitions.lisp

Exported Definitions

*format-version* (special variable)

Internal Definitions

Previous: , Up: Lisp files   [Contents][Index]

3.1.5 plump-bundle/frontend.lisp

Dependency

definitions.lisp (file)

Parent

plump-bundle (system)

Location

frontend.lisp

Exported Definitions

Next: , Previous: , Up: Top   [Contents][Index]

4 Packages

Packages are listed by definition order.


Next: , Previous: , Up: Packages   [Contents][Index]

4.1 plump-bundle-readers

Source

package.lisp (file)

Internal Definitions

Next: , Previous: , Up: Packages   [Contents][Index]

4.2 plump-bundle-writers

Source

package.lisp (file)

Internal Definitions

Previous: , Up: Packages   [Contents][Index]

4.3 plump-bundle

Source

package.lisp (file)

Nickname

org.shirakumo.plump.bundle

Use List
Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

5 Definitions

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


Next: , Previous: , Up: Definitions   [Contents][Index]

5.1 Exported definitions


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.1 Special variables

Special Variable: *format-version*
Package

plump-bundle

Source

definitions.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.2 Functions

Function: output-to-file PATHNAME ROOT &key IF-EXISTS IF-DOES-NOT-EXIST

A wrapper around OUTPUT to allow specifying of IF-EXISTS and IF-DOES-NOT-EXIST.

Package

plump-bundle

Source

frontend.lisp (file)


Previous: , Up: Exported definitions   [Contents][Index]

5.1.3 Generic functions

Generic Function: input INPUT

Parse INPUT to a Plump document. Methods are defined for FAST-IO::INPUT-BUFFER
STREAM (unsigned-byte 8) element-type PATHNAME
STRING treated as namestring VECTOR (unsigned-byte 8) element-type

Package

plump-bundle

Source

frontend.lisp (file)

Methods
Method: input (INPUT input-buffer)
Method: input (INPUT stream)
Method: input (INPUT pathname)
Method: input (INPUT string)
Method: input (INPUT vector)
Generic Function: output TARGET ROOT

Turn ROOT into a bundle and store it in TARGET. Methods are definted for FAST-IO::OUTPUT-BUFFER
STREAM (unsigned-byte 8) element-type PATHNAME
STRING treated as namestring
:VECTOR

Package

plump-bundle

Source

frontend.lisp (file)

Methods
Method: output (OUTPUT output-buffer) ROOT
Method: output (OUTPUT stream) ROOT
Method: output (OUTPUT pathname) ROOT
Method: output (OUTPUT string) ROOT
Method: output (OUTPUT (eql vector)) ROOT

Previous: , Up: Definitions   [Contents][Index]

5.2 Internal definitions


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.1 Special variables

Special Variable: *buffer*
Package

plump-bundle

Source

machinery.lisp (file)

Special Variable: *chunk-translations*
Package

plump-bundle

Source

machinery.lisp (file)

Special Variable: *parent*
Package

plump-bundle

Source

machinery.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.2 Macros

Macro: check-equal PART READER TYPE-FORMAT
Package

plump-bundle

Source

machinery.lisp (file)

Macro: define-chunk (TYPE CLASS-NAME) INITARGS &body BODY
Package

plump-bundle

Source

machinery.lisp (file)

Macro: define-chunk-translator ()
Package

plump-bundle

Source

machinery.lisp (file)

Macro: define-reader NAME ARGS &body BODY
Package

plump-bundle

Source

machinery.lisp (file)

Macro: define-section NAME &body PARTS
Package

plump-bundle

Source

machinery.lisp (file)

Macro: define-writer NAME ARGS &body BODY
Package

plump-bundle

Source

machinery.lisp (file)

Macro: read! READER &rest ARGS
Package

plump-bundle

Source

machinery.lisp (file)

Macro: write! WRITER &rest ARGS
Package

plump-bundle

Source

machinery.lisp (file)


Previous: , Up: Internal definitions   [Contents][Index]

5.2.3 Functions

Function: body ()
Package

plump-bundle-readers

Source

definitions.lisp (file)

Function: body ()
Package

plump-bundle-writers

Source

definitions.lisp (file)

Function: byte ()
Package

plump-bundle-readers

Source

machinery.lisp (file)

Function: byte BYTE
Package

plump-bundle-writers

Source

machinery.lisp (file)

Function: cdata ()
Package

plump-bundle-readers

Source

definitions.lisp (file)

Function: cdata &optional INSTANCE0
Package

plump-bundle-writers

Source

definitions.lisp (file)

Function: char ()
Package

plump-bundle-readers

Source

machinery.lisp (file)

Function: char CHAR
Package

plump-bundle-writers

Source

machinery.lisp (file)

Function: child-node ()
Package

plump-bundle-readers

Source

definitions.lisp (file)

Function: child-node &optional INSTANCE0
Package

plump-bundle-writers

Source

definitions.lisp (file)

Function: children ()
Package

plump-bundle-readers

Source

definitions.lisp (file)

Function: children &optional NODE
Package

plump-bundle-writers

Source

definitions.lisp (file)

Function: chunk ()
Package

plump-bundle-readers

Source

definitions.lisp (file)

Function: chunk CHUNK1
Package

plump-bundle-writers

Source

definitions.lisp (file)

Function: chunk-translation TYPE
Function: (setf chunk-translation) CLASS-NAME TYPE
Package

plump-bundle

Source

machinery.lisp (file)

Function: comment ()
Package

plump-bundle-readers

Source

definitions.lisp (file)

Function: comment &optional INSTANCE0
Package

plump-bundle-writers

Source

definitions.lisp (file)

Function: doctype ()
Package

plump-bundle-readers

Source

definitions.lisp (file)

Function: doctype &optional INSTANCE0
Package

plump-bundle-writers

Source

definitions.lisp (file)

Function: element ()
Package

plump-bundle-readers

Source

definitions.lisp (file)

Function: element &optional INSTANCE0
Package

plump-bundle-writers

Source

definitions.lisp (file)

Function: end-file ()
Package

plump-bundle-readers

Source

definitions.lisp (file)

Function: end-file ()
Package

plump-bundle-writers

Source

definitions.lisp (file)

Function: file ()
Package

plump-bundle-readers

Source

definitions.lisp (file)

Function: file ()
Package

plump-bundle-writers

Source

definitions.lisp (file)

Function: find-accessor-for-initarg CLASS INITARG
Package

plump-bundle

Source

machinery.lisp (file)

Function: footer ()
Package

plump-bundle-readers

Source

definitions.lisp (file)

Function: footer ()
Package

plump-bundle-writers

Source

definitions.lisp (file)

Function: fulltext-element ()
Package

plump-bundle-readers

Source

definitions.lisp (file)

Function: fulltext-element &optional INSTANCE0
Package

plump-bundle-writers

Source

definitions.lisp (file)

Function: header ()
Package

plump-bundle-readers

Source

definitions.lisp (file)

Function: header ()
Package

plump-bundle-writers

Source

definitions.lisp (file)

Function: integer ()
Package

plump-bundle-readers

Source

machinery.lisp (file)

Function: integer INT
Package

plump-bundle-writers

Source

machinery.lisp (file)

Function: map ()
Package

plump-bundle-readers

Source

definitions.lisp (file)

Function: map MAP
Package

plump-bundle-writers

Source

definitions.lisp (file)

Function: nesting-node ()
Package

plump-bundle-readers

Source

definitions.lisp (file)

Function: nesting-node &optional INSTANCE0
Package

plump-bundle-writers

Source

definitions.lisp (file)

Function: node ()
Package

plump-bundle-readers

Source

definitions.lisp (file)

Function: node &optional INSTANCE0
Package

plump-bundle-writers

Source

definitions.lisp (file)

Function: null ()
Package

plump-bundle-readers

Source

definitions.lisp (file)

Function: null INSTANCE
Package

plump-bundle-writers

Source

definitions.lisp (file)

Function: parent ()
Package

plump-bundle-readers

Source

definitions.lisp (file)

Function: parent ARG
Package

plump-bundle-writers

Source

definitions.lisp (file)

Function: processing-instruction ()
Package

plump-bundle-readers

Source

definitions.lisp (file)

Function: processing-instruction &optional INSTANCE0
Package

plump-bundle-writers

Source

definitions.lisp (file)

Function: reader-name NAME
Package

plump-bundle

Source

machinery.lisp (file)

Function: root ()
Package

plump-bundle-readers

Source

definitions.lisp (file)

Function: root &optional INSTANCE0
Package

plump-bundle-writers

Source

definitions.lisp (file)

Function: string &optional LENGTH
Package

plump-bundle-readers

Source

machinery.lisp (file)

Function: string STRING
Package

plump-bundle-writers

Source

machinery.lisp (file)

Function: text-node ()
Package

plump-bundle-readers

Source

definitions.lisp (file)

Function: text-node &optional INSTANCE0
Package

plump-bundle-writers

Source

definitions.lisp (file)

Function: textual-node ()
Package

plump-bundle-readers

Source

definitions.lisp (file)

Function: textual-node &optional INSTANCE0
Package

plump-bundle-writers

Source

definitions.lisp (file)

Function: timestamp ()
Package

plump-bundle-readers

Source

definitions.lisp (file)

Function: timestamp ()
Package

plump-bundle-writers

Source

definitions.lisp (file)

Function: transform-reader-part PART
Package

plump-bundle

Source

machinery.lisp (file)

Function: transform-writer-part PART
Package

plump-bundle

Source

machinery.lisp (file)

Function: type ()
Package

plump-bundle-readers

Source

machinery.lisp (file)

Function: type TYPE
Package

plump-bundle-writers

Source

machinery.lisp (file)

Function: type= A B
Package

plump-bundle

Source

machinery.lisp (file)

Function: version ()
Package

plump-bundle-readers

Source

definitions.lisp (file)

Function: version ()
Package

plump-bundle-writers

Source

definitions.lisp (file)

Function: writer-name NAME
Package

plump-bundle

Source

machinery.lisp (file)

Function: xml-header ()
Package

plump-bundle-readers

Source

definitions.lisp (file)

Function: xml-header &optional INSTANCE0
Package

plump-bundle-writers

Source

definitions.lisp (file)


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   F   L   P  
Index Entry  Section

F
File, Lisp, plump-bundle.asd: The plump-bundle<dot>asd file
File, Lisp, plump-bundle/definitions.lisp: The plump-bundle/definitions<dot>lisp file
File, Lisp, plump-bundle/frontend.lisp: The plump-bundle/frontend<dot>lisp file
File, Lisp, plump-bundle/machinery.lisp: The plump-bundle/machinery<dot>lisp file
File, Lisp, plump-bundle/package.lisp: The plump-bundle/package<dot>lisp file

L
Lisp File, plump-bundle.asd: The plump-bundle<dot>asd file
Lisp File, plump-bundle/definitions.lisp: The plump-bundle/definitions<dot>lisp file
Lisp File, plump-bundle/frontend.lisp: The plump-bundle/frontend<dot>lisp file
Lisp File, plump-bundle/machinery.lisp: The plump-bundle/machinery<dot>lisp file
Lisp File, plump-bundle/package.lisp: The plump-bundle/package<dot>lisp file

P
plump-bundle.asd: The plump-bundle<dot>asd file
plump-bundle/definitions.lisp: The plump-bundle/definitions<dot>lisp file
plump-bundle/frontend.lisp: The plump-bundle/frontend<dot>lisp file
plump-bundle/machinery.lisp: The plump-bundle/machinery<dot>lisp file
plump-bundle/package.lisp: The plump-bundle/package<dot>lisp file

Jump to:   F   L   P  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   (  
B   C   D   E   F   G   H   I   M   N   O   P   R   S   T   V   W   X  
Index Entry  Section

(
(setf chunk-translation): Internal functions

B
body: Internal functions
body: Internal functions
byte: Internal functions
byte: Internal functions

C
cdata: Internal functions
cdata: Internal functions
char: Internal functions
char: Internal functions
check-equal: Internal macros
child-node: Internal functions
child-node: Internal functions
children: Internal functions
children: Internal functions
chunk: Internal functions
chunk: Internal functions
chunk-translation: Internal functions
comment: Internal functions
comment: Internal functions

D
define-chunk: Internal macros
define-chunk-translator: Internal macros
define-reader: Internal macros
define-section: Internal macros
define-writer: Internal macros
doctype: Internal functions
doctype: Internal functions

E
element: Internal functions
element: Internal functions
end-file: Internal functions
end-file: Internal functions

F
file: Internal functions
file: Internal functions
find-accessor-for-initarg: Internal functions
footer: Internal functions
footer: Internal functions
fulltext-element: Internal functions
fulltext-element: Internal functions
Function, (setf chunk-translation): Internal functions
Function, body: Internal functions
Function, body: Internal functions
Function, byte: Internal functions
Function, byte: Internal functions
Function, cdata: Internal functions
Function, cdata: Internal functions
Function, char: Internal functions
Function, char: Internal functions
Function, child-node: Internal functions
Function, child-node: Internal functions
Function, children: Internal functions
Function, children: Internal functions
Function, chunk: Internal functions
Function, chunk: Internal functions
Function, chunk-translation: Internal functions
Function, comment: Internal functions
Function, comment: Internal functions
Function, doctype: Internal functions
Function, doctype: Internal functions
Function, element: Internal functions
Function, element: Internal functions
Function, end-file: Internal functions
Function, end-file: Internal functions
Function, file: Internal functions
Function, file: Internal functions
Function, find-accessor-for-initarg: Internal functions
Function, footer: Internal functions
Function, footer: Internal functions
Function, fulltext-element: Internal functions
Function, fulltext-element: Internal functions
Function, header: Internal functions
Function, header: Internal functions
Function, integer: Internal functions
Function, integer: Internal functions
Function, map: Internal functions
Function, map: Internal functions
Function, nesting-node: Internal functions
Function, nesting-node: Internal functions
Function, node: Internal functions
Function, node: Internal functions
Function, null: Internal functions
Function, null: Internal functions
Function, output-to-file: Exported functions
Function, parent: Internal functions
Function, parent: Internal functions
Function, processing-instruction: Internal functions
Function, processing-instruction: Internal functions
Function, reader-name: Internal functions
Function, root: Internal functions
Function, root: Internal functions
Function, string: Internal functions
Function, string: Internal functions
Function, text-node: Internal functions
Function, text-node: Internal functions
Function, textual-node: Internal functions
Function, textual-node: Internal functions
Function, timestamp: Internal functions
Function, timestamp: Internal functions
Function, transform-reader-part: Internal functions
Function, transform-writer-part: Internal functions
Function, type: Internal functions
Function, type: Internal functions
Function, type=: Internal functions
Function, version: Internal functions
Function, version: Internal functions
Function, writer-name: Internal functions
Function, xml-header: Internal functions
Function, xml-header: Internal functions

G
Generic Function, input: Exported generic functions
Generic Function, output: Exported generic functions

H
header: Internal functions
header: Internal functions

I
input: Exported generic functions
input: Exported generic functions
input: Exported generic functions
input: Exported generic functions
input: Exported generic functions
input: Exported generic functions
integer: Internal functions
integer: Internal functions

M
Macro, check-equal: Internal macros
Macro, define-chunk: Internal macros
Macro, define-chunk-translator: Internal macros
Macro, define-reader: Internal macros
Macro, define-section: Internal macros
Macro, define-writer: Internal macros
Macro, read!: Internal macros
Macro, write!: Internal macros
map: Internal functions
map: Internal functions
Method, input: Exported generic functions
Method, input: Exported generic functions
Method, input: Exported generic functions
Method, input: Exported generic functions
Method, input: Exported generic functions
Method, output: Exported generic functions
Method, output: Exported generic functions
Method, output: Exported generic functions
Method, output: Exported generic functions
Method, output: Exported generic functions

N
nesting-node: Internal functions
nesting-node: Internal functions
node: Internal functions
node: Internal functions
null: Internal functions
null: Internal functions

O
output: Exported generic functions
output: Exported generic functions
output: Exported generic functions
output: Exported generic functions
output: Exported generic functions
output: Exported generic functions
output-to-file: Exported functions

P
parent: Internal functions
parent: Internal functions
processing-instruction: Internal functions
processing-instruction: Internal functions

R
read!: Internal macros
reader-name: Internal functions
root: Internal functions
root: Internal functions

S
string: Internal functions
string: Internal functions

T
text-node: Internal functions
text-node: Internal functions
textual-node: Internal functions
textual-node: Internal functions
timestamp: Internal functions
timestamp: Internal functions
transform-reader-part: Internal functions
transform-writer-part: Internal functions
type: Internal functions
type: Internal functions
type=: Internal functions

V
version: Internal functions
version: Internal functions

W
write!: Internal macros
writer-name: Internal functions

X
xml-header: Internal functions
xml-header: Internal functions

Jump to:   (  
B   C   D   E   F   G   H   I   M   N   O   P   R   S   T   V   W   X  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   *  
S  
Index Entry  Section

*
*buffer*: Internal special variables
*chunk-translations*: Internal special variables
*format-version*: Exported special variables
*parent*: Internal special variables

S
Special Variable, *buffer*: Internal special variables
Special Variable, *chunk-translations*: Internal special variables
Special Variable, *format-version*: Exported special variables
Special Variable, *parent*: Internal special variables

Jump to:   *  
S  

Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   P   S  
Index Entry  Section

P
Package, plump-bundle: The plump-bundle package
Package, plump-bundle-readers: The plump-bundle-readers package
Package, plump-bundle-writers: The plump-bundle-writers package
plump-bundle: The plump-bundle system
plump-bundle: The plump-bundle package
plump-bundle-readers: The plump-bundle-readers package
plump-bundle-writers: The plump-bundle-writers package

S
System, plump-bundle: The plump-bundle system

Jump to:   P   S