Hi, These two snippets: (let* ((type (bindat-type (data strz))) (data [#x4e #x6f #x6e #x65 #x00]) (unpacked (bindat-unpack type data))) (bindat-get-field unpacked 'data)) (let* ((type (bindat-type (data str 4))) (data [#x4e #x6f #x6e #x65]) (unpacked (bindat-unpack type data))) (bindat-get-field unpacked 'data)) Both fail similarly: Debugger entered--Lisp error: (wrong-type-argument listp [78 111 110 101]) apply(unibyte-string [78 111 110 101]) (if (stringp s) s (apply #'unibyte-string s)) (let ((i 0) s) (while (and (if len (< i len) t) (/= (aref bindat-raw (+ bindat-idx i)) 0)) (setq i (1+ i))) (setq s (substring bindat-raw bindat-idx (+ bindat-idx i))) (setq bindat-idx (+ bindat-idx (or len (1+ i)))) (if (stringp s) s (apply #'unibyte-string s))) bindat--unpack-strz(nil) [...] Debugger entered--Lisp error: (wrong-type-argument listp [78 111 110 101]) apply(unibyte-string [78 111 110 101]) (if (stringp s) s (apply #'unibyte-string s)) (let ((s (substring bindat-raw bindat-idx (+ bindat-idx len)))) (setq bindat-idx (+ bindat-idx len)) (if (stringp s) s (apply #'unibyte-string s))) bindat--unpack-str(4) [...] With the attached patch both return the string "None" as expected (well, as I'd expect, *grins*). The diff also adds some extra tests. I'm running 28.2 but I've declared both functions as they're in the current master and the patch is on top of the current master, too. It's the first time that I look into this package so I'm not sure this is the way it's meant to work but similar operations work fine on vectors of bytes, for instance: (let* ((type (bindat-type (first uint 16) (second uint 16))) (data [#x00 #xff #xff #x00]) (unpacked (bindat-unpack type data))) (list (bindat-get-field unpacked 'first) (bindat-get-field unpacked 'second) (bindat-length type unpacked))) (which returns (255 65280 4) as expected) Please simply ignore this if I'm talking rubbish :) Hope this helps.