From 28cf76c95d2c1bb1966f5b21530fca59c94c0067 Mon Sep 17 00:00:00 2001 From: Eric Timmons <etimmons@mit.edu> Date: Sun, 2 Jan 2022 21:59:37 -0500 Subject: [PATCH] Be a bit lenient for gray streams that don't implement STREAM-ELEMENT-TYPE --- CHANGELOG.md | 2 ++ src/blocked-stream.lisp | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 449fd42..ff42fd5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ ## Unreleased + Fix bug with determining type of entries in v7 archives. ++ If given a gray stream that does not implement `stream-element-type`, assume + it is `(unsigned-byte 8)`. ## v0.1.2 - September 25, 2021 diff --git a/src/blocked-stream.lisp b/src/blocked-stream.lisp index 3228b8d..91113d6 100644 --- a/src/blocked-stream.lisp +++ b/src/blocked-stream.lisp @@ -83,7 +83,8 @@ of the wrapped stream when instantiated.")) (defmethod initialize-instance :after ((blocked-stream blocked-stream) &key stream) - (let ((element-type (stream-element-type stream))) + (let ((element-type (or (ignore-errors (stream-element-type stream)) + '(unsigned-byte 8)))) (assert (subtypep element-type 'integer) nil "STREAM must be a binary stream") ;; Create the buffer. -- GitLab