diff options
author | Piotr Szarmanski | 2022-12-30 20:50:05 +0100 |
---|---|---|
committer | Piotr Szarmanski | 2022-12-30 20:50:05 +0100 |
commit | 219e118a80858e05e7b9917f9d0996af70982ae4 (patch) | |
tree | d4a30ac582f98b77a79a164d40f9a7e794e1c6b4 /src/file-backend.lisp | |
parent | 618ee634557122b3b3c5012405603b28c0001d13 (diff) | |
parent | 5afc44c1082ae7088511f318aa9bd3d4b25ba3c6 (diff) |
Merge branch 'no-allocate-buffers'
Diffstat (limited to 'src/file-backend.lisp')
-rw-r--r-- | src/file-backend.lisp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/file-backend.lisp b/src/file-backend.lisp index 03e3ef7..1a1c5b0 100644 --- a/src/file-backend.lisp +++ b/src/file-backend.lisp @@ -51,9 +51,10 @@ (let* ((base32 (bytes-to-base32-unpadded reference)) (file (merge-pathnames directory base32))) (unless (probe-file file) - (alexandria:write-byte-vector-into-file block file))))))) + (alexandria:write-byte-vector-into-file block file))) + block)))) -(defmethod fetch-read-capability (read-capability (backend file-backend) &key &allow-other-keys) +(defmethod fetch-data (read-capability (backend file-backend) &key &allow-other-keys) (declare (type read-capability read-capability)) (with-slots (fetch-function) backend (eris-decode read-capability fetch-function))) @@ -65,7 +66,7 @@ (if (> (etypecase input (stream (file-length input)) (vector (length input))) - 16384) + (* 2 16384)) 32kib 1kib) output-function |