summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPiotr Szarmanski2023-08-03 09:14:38 +0200
committerPiotr Szarmanski2023-08-03 09:14:38 +0200
commit1cc3d6ad62e2cde54618be9f6befbc79e393a6ff (patch)
tree159decf39889c793fcea5fc89bffcb278ee78899
parentd9f52ce9f2e5b81443bdac6ae4f3855330bb43a5 (diff)
Update the readme & update version to 0.2.
-rw-r--r--README21
-rw-r--r--src/eris.lisp1
2 files changed, 21 insertions, 1 deletions
diff --git a/README b/README
index 1e7bc5c..6957b09 100644
--- a/README
+++ b/README
@@ -22,6 +22,7 @@ read-capability-to-octets
reference-to-block-urn
block-urn-to-reference
+
The eris-encode (INPUT BLOCK-SIZE OUTPUT-FUNCTION &KEY SECRET HASH-OUTPUT)
function can be used to encode a vector or a stream into an ERIS
read-capability.
@@ -53,4 +54,22 @@ As an example, a file-based backend called file-backend is provided. It can be
used simply by making an instance of the 'file-backend class with a :directory
argument, which will point to the directory in which ERIS data is to be stored.
-There is also hash-backend, which implements a simple hash-table backend.
+There is also hash-backend, which implements a simple hash-table backend. It is
+primarily meant for testing, not actual usage.
+
+The API contains the following symbols:
+
+fetch-data (READ-CAPABILITY BACKEND &key)
+store-data (INPUT BACKEND &key)
+
+Classes:
+
+encoding-backend
+decoding-backend
+
+An instance of file-backend can be instanced using (make-instance 'file-backend
+:directory "my/dir/with/eris/chunks/").
+
+For further information, see the docstrings.
+
+
diff --git a/src/eris.lisp b/src/eris.lisp
index ba04c03..8f836f8 100644
--- a/src/eris.lisp
+++ b/src/eris.lisp
@@ -155,6 +155,7 @@ versioning bytes are not supported by eris-cl."
(declare (type string urn))
(base32-to-bytes-unpadded (subseq urn (1+ (position #\: urn :from-end t)))))
+
(defun pad (input block-size)
(declare (type octet-vector input)
(type integer block-size))