summaryrefslogtreecommitdiff
path: root/src/eris-decode.lisp
diff options
context:
space:
mode:
Diffstat (limited to 'src/eris-decode.lisp')
-rw-r--r--src/eris-decode.lisp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/eris-decode.lisp b/src/eris-decode.lisp
index 508dc67..afbb818 100644
--- a/src/eris-decode.lisp
+++ b/src/eris-decode.lisp
@@ -35,13 +35,13 @@ fetched from a trusted party.")
(equalp (key kr) null-secret)))
(defclass high-block ()
- ((data :initarg :data :accessor data :type (simple-array (unsigned-byte 8)))
+ ((data :initarg :data :accessor data :type octet-vector)
(position :initarg :position :accessor pos :type integer
:documentation "Position relative to the higher block.")
- (level :initarg :level :accessor level :type (unsigned-byte 8))))
+ (level :initarg :level :accessor level :type octet)))
(defclass buffer ()
- ((data :initarg :data :accessor data :type (simple-array (unsigned-byte 8)))
+ ((data :initarg :data :accessor data :type octet-vector)
(pos :initarg :pos :accessor pos :type fixnum)
(eof :initarg :eof :accessor eof :type fixnum
:documentation "Either the position of the EOF in the buffer, or the length of the buffer.")))
@@ -66,7 +66,7 @@ fetched from a trusted party.")
(let ((padding (position #x80 block :from-end t)))
(unless padding
(error 'padding-error))
- (unless (loop for i across (subseq-shared block (1+ padding))
+ (unless (loop for i across (nsubseq block (1+ padding))
always (zerop i))
(error 'padding-error))
padding))
@@ -144,7 +144,7 @@ it is necessary and sets the position in the buffer to 0."
#+sbcl (sb-ext:muffle-conditions sb-ext:compiler-note))
(with-slots (data pos eof) buf
(declare (type (integer 0 32768) pos eof)
- (type (simple-array (unsigned-byte 8)) data))
+ (type octet-vector data))
(let ((buffer-bytes (- eof pos))
(seq-bytes (- end start)))
(declare (dynamic-extent buffer-bytes seq-bytes)
@@ -202,7 +202,7 @@ it is necessary and sets the position in the buffer to 0."
(defun initialize-high-blocks (level)
(case level
(-1 nil)
- (t (cons (make-instance 'high-block :level level :position -1 :data (make-array 0 :element-type '(unsigned-byte 8)))
+ (t (cons (make-instance 'high-block :level level :position -1 :data (make-array 0 :element-type 'octet))
(initialize-high-blocks (1- level))))))
@@ -240,7 +240,7 @@ cache."
(0 (let ((stream
(make-instance 'eris-decode-stream
:buffer (make-instance 'buffer
- :data (make-array block-size :element-type '(unsigned-byte 8))
+ :data (make-array block-size :element-type 'octet)
:pos 0
:eof -1)
:get-block (lambda (reference key)
@@ -255,7 +255,7 @@ cache."
stream))
(t (make-instance 'eris-decode-stream
:buffer (make-instance 'buffer
- :data (make-array block-size :element-type '(unsigned-byte 8))
+ :data (make-array block-size :element-type 'octet)
:pos -1
:eof block-size)
:get-block get-block