Plaster

text
(defun spit-binary (file object &key count) "Output a vector of octets to FILE. OBJECT must be a (vector (unsigned-byte 8)). If COUNT is non-nil, only write that many elements." (with-open-file (stream file :direction :output :if-does-not-exist :create :if-exists :append :element-type '(unsigned-byte 8)) (assert (typep object '(vector (unsigned-byte 8)))) (if count (write-sequence object stream :start 0 :end count) (write-sequence object stream))))