summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPiotr Szarmanski2023-02-07 16:56:30 +0100
committerPiotr Szarmanski2023-02-07 16:56:30 +0100
commitd9f52ce9f2e5b81443bdac6ae4f3855330bb43a5 (patch)
tree495cc3c1b7e376d178899566373df60513af1cd7
parent1c7d53e105fdbd61dd14f526d94bfe87f59e2a20 (diff)
Remove examples/*.
-rw-r--r--README6
-rw-r--r--examples/file/eris-file.asd9
-rw-r--r--examples/file/eris-file.lisp30
-rw-r--r--examples/file/package.lisp2
-rw-r--r--src/package.lisp5
5 files changed, 5 insertions, 47 deletions
diff --git a/README b/README
index 606afba..1e7bc5c 100644
--- a/README
+++ b/README
@@ -5,14 +5,10 @@ the specification.
The code is licensed under the LGPLv3 or any later version, unless specified
otherwise in a file.
-Depends on Alexandria, Ironclad version 0.58+, function-cache,
+Depends on Alexandria, Serapeum, Ironclad (version 0.58+), function-cache,
trivial-gray-streams, bordeaux-threads, and fiveam for testing. In addition, on
POSIX systems the mmap and osicat libraries are used for the parallel decoder.
-Until the Ironclad library released version 0.58, you have to use the master
-branch as it contains the necessary patch to add the RFC Chacha variant to
-Ironclad.
-
The public API is exported by the ERIS package.
diff --git a/examples/file/eris-file.asd b/examples/file/eris-file.asd
deleted file mode 100644
index 0de4ca6..0000000
--- a/examples/file/eris-file.asd
+++ /dev/null
@@ -1,9 +0,0 @@
-(defsystem "eris-file"
- :name "eris-file"
- :author "mail@ykonai.net"
- :license "LGPLv3 or later"
- :depends-on ("eris" "alexandria")
- :serial t
- :components
- ((:file "package")
- (:file "eris-file")))
diff --git a/examples/file/eris-file.lisp b/examples/file/eris-file.lisp
deleted file mode 100644
index fdc53ef..0000000
--- a/examples/file/eris-file.lisp
+++ /dev/null
@@ -1,30 +0,0 @@
-(in-package :eris-file)
-(defvar *eris-directory* "/tmp/")
-
-(defun output-to-file (block reference)
- (let* ((base32 (eris:bytes-to-base32-unpadded reference))
- (file (concatenate 'string *eris-directory* base32)))
- (unless (probe-file file)
- (alexandria:write-byte-vector-into-file block file))))
-
-(defun input-from-file (reference)
- (let* ((base32 (eris:bytes-to-base32-unpadded reference))
- (file (concatenate 'string *eris-directory* base32)))
- (if (probe-file file)
- (alexandria:read-file-into-byte-vector file)
- nil)))
-
-(defun encode-file (input-file &optional (output-directory *eris-directory*))
- (let ((*eris-directory* output-directory))
- (with-open-file (file input-file :direction :input :element-type '(unsigned-byte 8))
- (eris:read-capability-to-urn
- (eris:eris-encode file
- (if (< (file-length file) (* 1024 16)) 1024 eris:32kib)
- #'output-to-file
- :hash-output nil)))))
-
-(defun decode-file (urn output-file &optional (output-directory *eris-directory*))
- (let ((*eris-directory* output-directory))
- (with-open-file (file output-file :direction :output :element-type '(unsigned-byte 8))
- (alexandria:copy-stream (eris:eris-decode (eris:urn-to-read-capability urn) #'input-from-file)
- file))))
diff --git a/examples/file/package.lisp b/examples/file/package.lisp
deleted file mode 100644
index 0dc504b..0000000
--- a/examples/file/package.lisp
+++ /dev/null
@@ -1,2 +0,0 @@
-(defpackage :eris-file
- (:use common-lisp))
diff --git a/src/package.lisp b/src/package.lisp
index b5c7a4a..364b768 100644
--- a/src/package.lisp
+++ b/src/package.lisp
@@ -24,6 +24,7 @@
#:1kib
#:null-secret
#:*decode-safety-checks*
+ #:read-capability
#:read-capability-to-urn
#:urn-to-read-capability
@@ -51,4 +52,6 @@
#:encoding-backend
#:decoding-backend
#:file-backend
- #:hash-backend))
+ #:hash-backend
+ #:output-function
+ #:fetch-function))