This is the smart-buffer Reference Manual, version 0.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 07:43:59 2024 GMT+0.
The main system appears first, followed by any subsystem dependency.
smart-buffer
Smart octets buffer
Eitaro Fukamachi
BSD 3-Clause
# smart-buffer
[![Build Status](https://travis-ci.org/fukamachi/smart-buffer.svg?branch=master)](https://travis-ci.org/fukamachi/smart-buffer)
[![Coverage Status](https://coveralls.io/repos/fukamachi/smart-buffer/badge.svg?branch=master)](https://coveralls.io/r/fukamachi/smart-buffer)
Smart-buffer provides an output buffer which changes the destination depending on content size.
* In-memory buffer for small data
* Temporary files on disk for big data
In-memory buffer is fast to read/write, however, it consumes much memory if the data can be large. On the other hand, files on disk are slower. Smart-buffer would be useful when the buffer must satisfy these two contradicting demands.
## Usage
‘with-smart-buffer‘ returns an in-memory stream or a file stream.
“‘common-lisp
(with-smart-buffer (buffer)
(write-to-buffer buffer (flex:string-to-octets "foobar")))
;=> #<FLEXI-STREAMS::VECTOR-INPUT-STREAM {100456A9A3}>
(with-smart-buffer (buffer :memory-limit 3)
(write-to-buffer buffer (flex:string-to-octets "foobar")))
;=> #<SB-SYS:FD-STREAM for "file /private/var/folders/x3/8n07clk15tq3m4y6_yrmjy6c0000gn/T/tmpAR3FSGEY.tmp" {1005D06503}>
“‘
## Author
* Eitaro Fukamachi (e.arrows@gmail.com)
## Copyright
Copyright (c) 2015 Eitaro Fukamachi (e.arrows@gmail.com)
## License
Licensed under the BSD 3-Clause License.
0.1
xsubseq
(system).
flexi-streams
(system).
uiop
(system).
src
(module).
Modules are listed depth-first from the system components tree.
smart-buffer/src
smart-buffer
(system).
smart-buffer.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
smart-buffer/smart-buffer.asd
smart-buffer
(system).
smart-buffer/src/smart-buffer.lisp
src
(module).
*default-disk-limit*
(special variable).
*default-memory-limit*
(special variable).
buffer-limit-exceeded
(condition).
buffer-on-memory-p
(reader).
(setf buffer-on-memory-p)
(writer).
delete-stream-file
(function).
delete-temporary-files
(function).
finalize-buffer
(function).
make-smart-buffer
(function).
smart-buffer
(structure).
with-smart-buffer
(macro).
write-to-buffer
(function).
%make-smart-buffer
(function).
*temporary-directory*
(special variable).
buffer-current-len
(reader).
(setf buffer-current-len)
(writer).
buffer-disk-buffer
(reader).
(setf buffer-disk-buffer)
(writer).
buffer-disk-limit
(reader).
(setf buffer-disk-limit)
(writer).
buffer-memory-buffer
(reader).
(setf buffer-memory-buffer)
(writer).
buffer-memory-limit
(reader).
(setf buffer-memory-limit)
(writer).
check-limit
(function).
copy-smart-buffer
(function).
smart-buffer-p
(function).
Packages are listed by definition order.
smart-buffer
common-lisp
.
xsubseq
.
*default-disk-limit*
(special variable).
*default-memory-limit*
(special variable).
buffer-limit-exceeded
(condition).
buffer-on-memory-p
(reader).
(setf buffer-on-memory-p)
(writer).
delete-stream-file
(function).
delete-temporary-files
(function).
finalize-buffer
(function).
make-smart-buffer
(function).
smart-buffer
(structure).
with-smart-buffer
(macro).
write-to-buffer
(function).
%make-smart-buffer
(function).
*temporary-directory*
(special variable).
buffer-current-len
(reader).
(setf buffer-current-len)
(writer).
buffer-disk-buffer
(reader).
(setf buffer-disk-buffer)
(writer).
buffer-disk-limit
(reader).
(setf buffer-disk-limit)
(writer).
buffer-memory-buffer
(reader).
(setf buffer-memory-buffer)
(writer).
buffer-memory-limit
(reader).
(setf buffer-memory-limit)
(writer).
check-limit
(function).
copy-smart-buffer
(function).
smart-buffer-p
(function).
Definitions are sorted by export status, category, package, and then by lexicographic order.
error
.
(quote nil)
:limit
structure-object
.
smart-buffer:*default-memory-limit*
smart-buffer:*default-disk-limit*
0
t
(xsubseq:make-concatenated-xsubseqs)
Jump to: | %
(
B C D F M S W |
---|
Jump to: | %
(
B C D F M S W |
---|
Jump to: | *
C D L M O S |
---|
Jump to: | *
C D L M O S |
---|
Jump to: | B C F M P S |
---|
Jump to: | B C F M P S |
---|