The zstd Reference Manual

This is the zstd Reference Manual, version 2.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sat Dec 03 20:55:03 2022 GMT+0.

Table of Contents


1 Introduction


2 Systems

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


2.1 zstd

Zstandard (de)compression using bindings to libzstd

Author

Guillaume Le Vaillant

License

GPL-3

Version

2.0

Dependencies
  • cffi (system).
  • cl-octet-streams (system).
  • trivial-gray-streams (system).
Source

zstd.asd.

Child Component

src (module).


3 Modules

Modules are listed depth-first from the system components tree.


3.1 zstd/src

Source

zstd.asd.

Parent Component

zstd (system).

Child Components

4 Files

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


4.1 Lisp


4.1.1 zstd/zstd.asd

Source

zstd.asd.

Parent Component

zstd (system).

ASDF Systems

zstd.


4.1.2 zstd/src/package.lisp

Source

zstd.asd.

Parent Component

src (module).

Packages

zstd.


4.1.3 zstd/src/libzstd.lisp

Dependency

package.lisp (file).

Source

zstd.asd.

Parent Component

src (module).

Internals

4.1.4 zstd/src/zstd.lisp

Dependency

libzstd.lisp (file).

Source

zstd.asd.

Parent Component

src (module).

Public Interface
Internals

5 Packages

Packages are listed by definition order.


5.1 zstd

Source

package.lisp.

Use List
  • common-lisp.
  • trivial-gray-streams.
Public Interface
Internals

6 Definitions

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


6.1 Public Interface


6.1.1 Macros

Macro: with-compressing-stream ((stream output-stream &key level) &body body)

Within BODY, STREAM is bound to a compressing stream for the given compression LEVEL and OUTPUT-STREAM. The result of the last form of BODY is returned.

Package

zstd.

Source

zstd.lisp.

Macro: with-decompressing-stream ((stream input-stream) &body body)

Within BODY, STREAM is bound to a decompressing stream for the given INPUT-STREAM. The result of the last form of BODY is returned.

Package

zstd.

Source

zstd.lisp.

Macro: zstd-error (message &rest args)
Package

zstd.

Source

zstd.lisp.


6.1.2 Ordinary functions

Function: compress-buffer (buffer &key start end level)

Read the data between the START and END offsets in the BUFFER, compress it, and return the resulting octet vector.

Package

zstd.

Source

zstd.lisp.

Function: compress-file (input output &key level)

Read the data from the INPUT file, compress it, and write the result to the OUTPUT file.

Package

zstd.

Source

zstd.lisp.

Function: compress-stream (input output &key level)

Read the data from the INPUT octet stream, compress it, and write the result to the OUTPUT octet stream.

Package

zstd.

Source

zstd.lisp.

Function: decompress-buffer (buffer &key start end)

Read the data between the START and END offsets in the BUFFER, decompress it, and return the resulting octet vector.

Package

zstd.

Source

zstd.lisp.

Function: decompress-file (input output)

Read the data from the INPUT file, decompress it, and write the result to the OUTPUT file.

Package

zstd.

Source

zstd.lisp.

Function: decompress-stream (input output)

Read the data from the INPUT octet stream, decompress it, and write the result to the OUTPUT octet stream.

Package

zstd.

Source

zstd.lisp.

Function: make-compressing-stream (output-stream &key level)

Return a stream that will compress the bytes written to it at the given compression LEVEL and write them to the OUTPUT-STREAM.

Package

zstd.

Source

zstd.lisp.

Function: make-decompressing-stream (input-stream)

Return a stream that will supply the bytes resulting from the decompression of the data read from the INPUT-STREAM.

Package

zstd.

Source

zstd.lisp.


6.1.3 Standalone methods

Method: close ((stream compressing-stream) &key &allow-other-keys)
Source

zstd.lisp.

Method: close ((stream decompressing-stream) &key &allow-other-keys)
Source

zstd.lisp.

Method: stream-element-type ((stream compressing-stream))
Source

zstd.lisp.

Method: stream-element-type ((stream decompressing-stream))
Source

zstd.lisp.

Method: stream-finish-output ((stream compressing-stream))
Package

sb-gray.

Source

zstd.lisp.

Method: stream-listen ((stream decompressing-stream))
Package

sb-gray.

Source

zstd.lisp.

Method: stream-read-byte ((stream decompressing-stream))
Package

sb-gray.

Source

zstd.lisp.

Method: stream-read-sequence ((stream decompressing-stream) seq start end &key &allow-other-keys)
Package

trivial-gray-streams.

Source

zstd.lisp.

Method: stream-write-byte ((stream compressing-stream) byte)
Package

sb-gray.

Source

zstd.lisp.

Method: stream-write-sequence ((stream compressing-stream) seq start end &key &allow-other-keys)
Package

trivial-gray-streams.

Source

zstd.lisp.


6.1.4 Conditions

Condition: zstd-error
Package

zstd.

Source

zstd.lisp.

Direct superclasses

simple-error.


6.2 Internals


6.2.1 Constants

Constant: +buffer-size+
Package

zstd.

Source

zstd.lisp.


6.2.2 Macros

Macro: zstd-check (form)
Package

zstd.

Source

zstd.lisp.


6.2.3 Ordinary functions

Function: compress-and-write (stream)
Package

zstd.

Source

zstd.lisp.

Function: initialize-context (context level)

Initialize the CONTEXT for the given compression LEVEL.

Package

zstd.

Source

zstd.lisp.

Function: read-and-decompress (stream)
Package

zstd.

Source

zstd.lisp.

Function: zstd-c-stream-in-size ()

Recommended size for compression input buffer.

Package

zstd.

Source

libzstd.lisp.

Function: zstd-c-stream-out-size ()

Recommended size for compression output buffer.

Package

zstd.

Source

libzstd.lisp.

Function: zstd-cctx-set-parameter (cctx param value)

Set one compression parameter.

Package

zstd.

Source

libzstd.lisp.

Function: zstd-compress-stream2 (cctx output input endop)

Compress the data with additional control on end directive.

Package

zstd.

Source

libzstd.lisp.

Function: zstd-create-cctx ()

Create a compression context.

Package

zstd.

Source

libzstd.lisp.

Function: zstd-create-dctx ()

Create a decompression context.

Package

zstd.

Source

libzstd.lisp.

Function: zstd-d-stream-in-size ()

Recommended size for decompression input buffer.

Package

zstd.

Source

libzstd.lisp.

Function: zstd-d-stream-out-size ()

Recommended size for decompression output buffer.

Package

zstd.

Source

libzstd.lisp.

Function: zstd-decompress-stream (zds output input)

Decompress the data.

Package

zstd.

Source

libzstd.lisp.

Function: zstd-free-cctx (cctx)

Free a compression context.

Package

zstd.

Source

libzstd.lisp.

Function: zstd-free-dctx (dctx)

Free a decompression context.

Package

zstd.

Source

libzstd.lisp.

Function: zstd-get-error-name (code)

Return a readable string from an error code.

Package

zstd.

Source

libzstd.lisp.

Function: zstd-is-error (code)

Tell if a function result is an error code.

Package

zstd.

Source

libzstd.lisp.

Function: zstd-max-c-level ()

Maximum compression level available.

Package

zstd.

Source

libzstd.lisp.

Function: zstd-min-c-level ()

Minimum compression level available.

Package

zstd.

Source

libzstd.lisp.


6.2.4 Generic functions

Generic Reader: frame-complete-p (object)
Package

zstd.

Methods
Reader Method: frame-complete-p ((decompressing-stream decompressing-stream))

automatically generated reader method

Source

zstd.lisp.

Target Slot

frame-complete-p.

Generic Writer: (setf frame-complete-p) (object)
Package

zstd.

Methods
Writer Method: (setf frame-complete-p) ((decompressing-stream decompressing-stream))

automatically generated writer method

Source

zstd.lisp.

Target Slot

frame-complete-p.

Generic Reader: input-buffer (object)
Package

zstd.

Methods
Reader Method: input-buffer ((decompressing-stream decompressing-stream))

automatically generated reader method

Source

zstd.lisp.

Target Slot

input-buffer.

Reader Method: input-buffer ((compressing-stream compressing-stream))

automatically generated reader method

Source

zstd.lisp.

Target Slot

input-buffer.

Generic Writer: (setf input-buffer) (object)
Package

zstd.

Methods
Writer Method: (setf input-buffer) ((decompressing-stream decompressing-stream))

automatically generated writer method

Source

zstd.lisp.

Target Slot

input-buffer.

Writer Method: (setf input-buffer) ((compressing-stream compressing-stream))

automatically generated writer method

Source

zstd.lisp.

Target Slot

input-buffer.

Generic Reader: input-stream (object)
Package

zstd.

Methods
Reader Method: input-stream ((decompressing-stream decompressing-stream))

automatically generated reader method

Source

zstd.lisp.

Target Slot

input-stream.

Generic Writer: (setf input-stream) (object)
Package

zstd.

Methods
Writer Method: (setf input-stream) ((decompressing-stream decompressing-stream))

automatically generated writer method

Source

zstd.lisp.

Target Slot

input-stream.

Generic Reader: output-buffer (object)
Package

zstd.

Methods
Reader Method: output-buffer ((decompressing-stream decompressing-stream))

automatically generated reader method

Source

zstd.lisp.

Target Slot

output-buffer.

Reader Method: output-buffer ((compressing-stream compressing-stream))

automatically generated reader method

Source

zstd.lisp.

Target Slot

output-buffer.

Generic Writer: (setf output-buffer) (object)
Package

zstd.

Methods
Writer Method: (setf output-buffer) ((decompressing-stream decompressing-stream))

automatically generated writer method

Source

zstd.lisp.

Target Slot

output-buffer.

Writer Method: (setf output-buffer) ((compressing-stream compressing-stream))

automatically generated writer method

Source

zstd.lisp.

Target Slot

output-buffer.

Generic Reader: output-stream (object)
Package

zstd.

Methods
Reader Method: output-stream ((compressing-stream compressing-stream))

automatically generated reader method

Source

zstd.lisp.

Target Slot

output-stream.

Generic Writer: (setf output-stream) (object)
Package

zstd.

Methods
Writer Method: (setf output-stream) ((compressing-stream compressing-stream))

automatically generated writer method

Source

zstd.lisp.

Target Slot

output-stream.

Generic Reader: zstd-context (object)
Package

zstd.

Methods
Reader Method: zstd-context ((decompressing-stream decompressing-stream))

automatically generated reader method

Source

zstd.lisp.

Target Slot

zstd-context.

Reader Method: zstd-context ((compressing-stream compressing-stream))

automatically generated reader method

Source

zstd.lisp.

Target Slot

zstd-context.

Generic Writer: (setf zstd-context) (object)
Package

zstd.

Methods
Writer Method: (setf zstd-context) ((decompressing-stream decompressing-stream))

automatically generated writer method

Source

zstd.lisp.

Target Slot

zstd-context.

Writer Method: (setf zstd-context) ((compressing-stream compressing-stream))

automatically generated writer method

Source

zstd.lisp.

Target Slot

zstd-context.

Generic Reader: zstd-in-buffer (object)
Package

zstd.

Methods
Reader Method: zstd-in-buffer ((decompressing-stream decompressing-stream))

automatically generated reader method

Source

zstd.lisp.

Target Slot

zstd-in-buffer.

Reader Method: zstd-in-buffer ((compressing-stream compressing-stream))

automatically generated reader method

Source

zstd.lisp.

Target Slot

zstd-in-buffer.

Generic Writer: (setf zstd-in-buffer) (object)
Package

zstd.

Methods
Writer Method: (setf zstd-in-buffer) ((decompressing-stream decompressing-stream))

automatically generated writer method

Source

zstd.lisp.

Target Slot

zstd-in-buffer.

Writer Method: (setf zstd-in-buffer) ((compressing-stream compressing-stream))

automatically generated writer method

Source

zstd.lisp.

Target Slot

zstd-in-buffer.

Generic Reader: zstd-out-buffer (object)
Package

zstd.

Methods
Reader Method: zstd-out-buffer ((decompressing-stream decompressing-stream))

automatically generated reader method

Source

zstd.lisp.

Target Slot

zstd-out-buffer.

Reader Method: zstd-out-buffer ((compressing-stream compressing-stream))

automatically generated reader method

Source

zstd.lisp.

Target Slot

zstd-out-buffer.

Generic Writer: (setf zstd-out-buffer) (object)
Package

zstd.

Methods
Writer Method: (setf zstd-out-buffer) ((decompressing-stream decompressing-stream))

automatically generated writer method

Source

zstd.lisp.

Target Slot

zstd-out-buffer.

Writer Method: (setf zstd-out-buffer) ((compressing-stream compressing-stream))

automatically generated writer method

Source

zstd.lisp.

Target Slot

zstd-out-buffer.


6.2.5 Classes

Class: compressing-stream
Package

zstd.

Source

zstd.lisp.

Direct superclasses

fundamental-binary-output-stream.

Direct methods
Direct slots
Slot: output-stream
Readers

output-stream.

Writers

(setf output-stream).

Slot: zstd-context
Readers

zstd-context.

Writers

(setf zstd-context).

Slot: input-buffer
Readers

input-buffer.

Writers

(setf input-buffer).

Slot: zstd-in-buffer
Readers

zstd-in-buffer.

Writers

(setf zstd-in-buffer).

Slot: output-buffer
Readers

output-buffer.

Writers

(setf output-buffer).

Slot: zstd-out-buffer
Readers

zstd-out-buffer.

Writers

(setf zstd-out-buffer).

Class: decompressing-stream
Package

zstd.

Source

zstd.lisp.

Direct superclasses

fundamental-binary-input-stream.

Direct methods
Direct slots
Slot: input-stream
Readers

input-stream.

Writers

(setf input-stream).

Slot: zstd-context
Readers

zstd-context.

Writers

(setf zstd-context).

Slot: input-buffer
Readers

input-buffer.

Writers

(setf input-buffer).

Slot: zstd-in-buffer
Readers

zstd-in-buffer.

Writers

(setf zstd-in-buffer).

Slot: output-buffer
Readers

output-buffer.

Writers

(setf output-buffer).

Slot: zstd-out-buffer
Readers

zstd-out-buffer.

Writers

(setf zstd-out-buffer).

Slot: frame-complete-p
Readers

frame-complete-p.

Writers

(setf frame-complete-p).

Class: zstd-in-buffer-tclass
Package

zstd.

Source

libzstd.lisp.

Direct superclasses
  • foreign-struct-type.
  • translatable-foreign-type.
Class: zstd-out-buffer-tclass
Package

zstd.

Source

libzstd.lisp.

Direct superclasses
  • foreign-struct-type.
  • translatable-foreign-type.

6.2.6 Types

Type: i32 ()
Package

zstd.

Source

libzstd.lisp.

Type: u32 ()
Package

zstd.

Source

libzstd.lisp.

Type: u64 ()
Package

zstd.

Source

libzstd.lisp.

Type: u8 ()
Package

zstd.

Source

zstd.lisp.


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   (  
C   D   F   G   I   M   O   R   S   W   Z  
Index Entry  Section

(
(setf frame-complete-p): Private generic functions
(setf frame-complete-p): Private generic functions
(setf input-buffer): Private generic functions
(setf input-buffer): Private generic functions
(setf input-buffer): Private generic functions
(setf input-stream): Private generic functions
(setf input-stream): Private generic functions
(setf output-buffer): Private generic functions
(setf output-buffer): Private generic functions
(setf output-buffer): Private generic functions
(setf output-stream): Private generic functions
(setf output-stream): Private generic functions
(setf zstd-context): Private generic functions
(setf zstd-context): Private generic functions
(setf zstd-context): Private generic functions
(setf zstd-in-buffer): Private generic functions
(setf zstd-in-buffer): Private generic functions
(setf zstd-in-buffer): Private generic functions
(setf zstd-out-buffer): Private generic functions
(setf zstd-out-buffer): Private generic functions
(setf zstd-out-buffer): Private generic functions

C
close: Public standalone methods
close: Public standalone methods
compress-and-write: Private ordinary functions
compress-buffer: Public ordinary functions
compress-file: Public ordinary functions
compress-stream: Public ordinary functions

D
decompress-buffer: Public ordinary functions
decompress-file: Public ordinary functions
decompress-stream: Public ordinary functions

F
frame-complete-p: Private generic functions
frame-complete-p: Private generic functions
Function, compress-and-write: Private ordinary functions
Function, compress-buffer: Public ordinary functions
Function, compress-file: Public ordinary functions
Function, compress-stream: Public ordinary functions
Function, decompress-buffer: Public ordinary functions
Function, decompress-file: Public ordinary functions
Function, decompress-stream: Public ordinary functions
Function, initialize-context: Private ordinary functions
Function, make-compressing-stream: Public ordinary functions
Function, make-decompressing-stream: Public ordinary functions
Function, read-and-decompress: Private ordinary functions
Function, zstd-c-stream-in-size: Private ordinary functions
Function, zstd-c-stream-out-size: Private ordinary functions
Function, zstd-cctx-set-parameter: Private ordinary functions
Function, zstd-compress-stream2: Private ordinary functions
Function, zstd-create-cctx: Private ordinary functions
Function, zstd-create-dctx: Private ordinary functions
Function, zstd-d-stream-in-size: Private ordinary functions
Function, zstd-d-stream-out-size: Private ordinary functions
Function, zstd-decompress-stream: Private ordinary functions
Function, zstd-free-cctx: Private ordinary functions
Function, zstd-free-dctx: Private ordinary functions
Function, zstd-get-error-name: Private ordinary functions
Function, zstd-is-error: Private ordinary functions
Function, zstd-max-c-level: Private ordinary functions
Function, zstd-min-c-level: Private ordinary functions

G
Generic Function, (setf frame-complete-p): Private generic functions
Generic Function, (setf input-buffer): Private generic functions
Generic Function, (setf input-stream): Private generic functions
Generic Function, (setf output-buffer): Private generic functions
Generic Function, (setf output-stream): Private generic functions
Generic Function, (setf zstd-context): Private generic functions
Generic Function, (setf zstd-in-buffer): Private generic functions
Generic Function, (setf zstd-out-buffer): Private generic functions
Generic Function, frame-complete-p: Private generic functions
Generic Function, input-buffer: Private generic functions
Generic Function, input-stream: Private generic functions
Generic Function, output-buffer: Private generic functions
Generic Function, output-stream: Private generic functions
Generic Function, zstd-context: Private generic functions
Generic Function, zstd-in-buffer: Private generic functions
Generic Function, zstd-out-buffer: Private generic functions

I
initialize-context: Private ordinary functions
input-buffer: Private generic functions
input-buffer: Private generic functions
input-buffer: Private generic functions
input-stream: Private generic functions
input-stream: Private generic functions

M
Macro, with-compressing-stream: Public macros
Macro, with-decompressing-stream: Public macros
Macro, zstd-check: Private macros
Macro, zstd-error: Public macros
make-compressing-stream: Public ordinary functions
make-decompressing-stream: Public ordinary functions
Method, (setf frame-complete-p): Private generic functions
Method, (setf input-buffer): Private generic functions
Method, (setf input-buffer): Private generic functions
Method, (setf input-stream): Private generic functions
Method, (setf output-buffer): Private generic functions
Method, (setf output-buffer): Private generic functions
Method, (setf output-stream): Private generic functions
Method, (setf zstd-context): Private generic functions
Method, (setf zstd-context): Private generic functions
Method, (setf zstd-in-buffer): Private generic functions
Method, (setf zstd-in-buffer): Private generic functions
Method, (setf zstd-out-buffer): Private generic functions
Method, (setf zstd-out-buffer): Private generic functions
Method, close: Public standalone methods
Method, close: Public standalone methods
Method, frame-complete-p: Private generic functions
Method, input-buffer: Private generic functions
Method, input-buffer: Private generic functions
Method, input-stream: Private generic functions
Method, output-buffer: Private generic functions
Method, output-buffer: Private generic functions
Method, output-stream: Private generic functions
Method, stream-element-type: Public standalone methods
Method, stream-element-type: Public standalone methods
Method, stream-finish-output: Public standalone methods
Method, stream-listen: Public standalone methods
Method, stream-read-byte: Public standalone methods
Method, stream-read-sequence: Public standalone methods
Method, stream-write-byte: Public standalone methods
Method, stream-write-sequence: Public standalone methods
Method, zstd-context: Private generic functions
Method, zstd-context: Private generic functions
Method, zstd-in-buffer: Private generic functions
Method, zstd-in-buffer: Private generic functions
Method, zstd-out-buffer: Private generic functions
Method, zstd-out-buffer: Private generic functions

O
output-buffer: Private generic functions
output-buffer: Private generic functions
output-buffer: Private generic functions
output-stream: Private generic functions
output-stream: Private generic functions

R
read-and-decompress: Private ordinary functions

S
stream-element-type: Public standalone methods
stream-element-type: Public standalone methods
stream-finish-output: Public standalone methods
stream-listen: Public standalone methods
stream-read-byte: Public standalone methods
stream-read-sequence: Public standalone methods
stream-write-byte: Public standalone methods
stream-write-sequence: Public standalone methods

W
with-compressing-stream: Public macros
with-decompressing-stream: Public macros

Z
zstd-c-stream-in-size: Private ordinary functions
zstd-c-stream-out-size: Private ordinary functions
zstd-cctx-set-parameter: Private ordinary functions
zstd-check: Private macros
zstd-compress-stream2: Private ordinary functions
zstd-context: Private generic functions
zstd-context: Private generic functions
zstd-context: Private generic functions
zstd-create-cctx: Private ordinary functions
zstd-create-dctx: Private ordinary functions
zstd-d-stream-in-size: Private ordinary functions
zstd-d-stream-out-size: Private ordinary functions
zstd-decompress-stream: Private ordinary functions
zstd-error: Public macros
zstd-free-cctx: Private ordinary functions
zstd-free-dctx: Private ordinary functions
zstd-get-error-name: Private ordinary functions
zstd-in-buffer: Private generic functions
zstd-in-buffer: Private generic functions
zstd-in-buffer: Private generic functions
zstd-is-error: Private ordinary functions
zstd-max-c-level: Private ordinary functions
zstd-min-c-level: Private ordinary functions
zstd-out-buffer: Private generic functions
zstd-out-buffer: Private generic functions
zstd-out-buffer: Private generic functions