Inputs and outputs
byte-arraya byte-array
uploada buffer-upload-pattern
usagea buffer-usage-pattern
kinda buffer-kind
buffera buffer

Word description
Allocates a new buffer object with the size and contents of byte-array. upload, usage, and kind provide hints to the implementation about the expected usage pattern of the buffer as documented in the buffer class documentation.


TYPED: byte-array>buffer
( byte-array upload: buffer-upload-pattern usage: buffer-usage-pattern kind: buffer-kind -- buffer: buffer )
[ ] 3curry dip [ byte-length ] [ ] bi <buffer> ;