Plaster
New
List
Login
common-lisp
default
anonymous
2021.03.25 20:17:35
CL-USER> (with-open-file (stream #p"/tmp/bytes" :element-type '(unsigned-byte 8) :direction :input) (let ((flexi-stream (flex:make-flexi-stream stream :position 0 :bound 4 :element-type '(unsigned-byte 8))) (output (make-array 10 :initial-element 0))) (read-sequence output flexi-stream) output)) #(0 1 2 3 0 0 0 0 0 0) CL-USER> (with-open-file (stream #p"/tmp/bytes" :element-type '(unsigned-byte 8) :direction :input) (let ((flexi-stream (flex:make-flexi-stream stream :position 4 :bound 4 :element-type '(unsigned-byte 8))) (output (make-array 10 :initial-element 0))) (read-sequence output flexi-stream) output)) #(0 0 0 0 0 0 0 0 0 0) CL-USER> (with-open-file (stream #p"/tmp/bytes" :element-type '(unsigned-byte 8) :direction :input) (let ((flexi-stream (flex:make-flexi-stream stream :position 4 :bound 8 :element-type '(unsigned-byte 8))) (output (make-array 10 :initial-element 0))) (read-sequence output flexi-stream) output)) #(0 1 2 3 0 0 0 0 0 0)
Raw
Annotate
Repaste
Edit