From 5afc44c1082ae7088511f318aa9bd3d4b25ba3c6 Mon Sep 17 00:00:00 2001 From: Piotr Szarmanski Date: Fri, 30 Dec 2022 18:29:24 +0100 Subject: Implement buffer reuse encoding. This implements a buffer reuse mechanism in eris-encode. This is also a backwards incompatible change, as the provided OUTPUT-FUNCTION now has an additional argument and has to return an octet-vector buffer of equal size. This is not yet implemented optimally, but should amount to a reduce of memory usage and GC required, especially for larger files. --- tests/backend-tests.lisp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/backend-tests.lisp') diff --git a/tests/backend-tests.lisp b/tests/backend-tests.lisp index 625740f..dc411d5 100644 --- a/tests/backend-tests.lisp +++ b/tests/backend-tests.lisp @@ -21,7 +21,7 @@ `(let ((backend (make-instance 'hash-backend)) (array ,array)) (is (equalp (alexandria:read-stream-content-into-byte-vector - (fetch-read-capability + (fetch-data (store-data array backend :block-size ,block-size :secret ,secret) backend)) array)))) @@ -49,7 +49,7 @@ (let* ((backend (make-instance 'file-backend :directory tmpdir)) (array ,array)) (is (equalp (alexandria:read-stream-content-into-byte-vector - (fetch-read-capability + (fetch-data (store-data array backend :secret ,secret) backend)) array))) (uiop:delete-directory-tree tmpdir :validate t)))) -- cgit v1.2.3