Formal comment #224 (defect) get-bytevector-some may be difficult to implement Reported by: Per Bothner Version: 5.92 It is unclear to me how one would implement get-bytevector-some. I don't think it can be implemented reasonably using the read call-back function of make-custom-binary-port. The best I can think of: allocated some largish buffer, call the read call-back, and the re-allocate a new bytevector with however many bytes were actually read. But that still won't return "a freshly allocated bytevector of non-zero size containing the available data" - just "a freshly allocated bytevector of non-zero size containing *part* of the available data". And it means allocating a temporary large bytevector and throwing it away. Fix: remove get-bytevector-some, or clarify that it reads "one or more of the available characters". I suggest the former. RESPONSE: How efficient implementations based on `read' are depends on the implementation: Some storage manager allow allocating a vector-like object and shrinking it later. Some operating systems might allow finding out the number of available bytes before actually requiring a buffer to be allocated. Moreover, even if `get-bytes-some' isn't very efficient on custom ports, it may still be efficient for other kinds of ports. In any case, the actual I/O overhead is likely to be significantly larger than the allocation overhead for a bytevector. Therefore, `get-bytevector-some' will be retained. The specification of `get-bytevector-some' will be clarified to say that it reads one or more of the available bytes.