3 ms·
mmap() files in Common Lisp
- mahmud 15y agoTerrible use-case though. ID3 metadata is a few hundred bytes, all of it in the header. Just use READ-SEQUENCE and be done with it. (defun read-n-bytes (path &optional (n 512)) (with-open-file (fd path :element-type '(unsigned-byte 8)) (let ((header (make-array n))) (read-sequence header fd) header)))
- galdor 15y agoYou're right, the example isn't a good use case for mmap, but it's just here to show how to use osicat for mmapping :)