binary-structures
binary-structures copied to clipboard
unsized strings and vectors don't work
(define-io-structure a
(a (vector (unsigned-byte 8))))
or
(define-io-structure a
(a string))
error during compilation with
No io-type with name
*
(and code for strings looks like it would inherit the "until end of input" behavior from vector rather than "until 0-termination byte" implied by docs)
Yeah the issue here is that the backend assumes it can always know the size of the vector ahead of time, so it can allocate it once and then fill it. For some backends it can estimate the size based on the remaining space, but for non-file streams for instance it wouldn't know how much is left, requiring a much more expensive path.