javascript binary data with [byte]

28 views
Skip to first unread message

Travis Wellman

unread,
Aug 7, 2017, 6:20:28 PM8/7/17
to FlatBuffers
I don't see any [byte] fields in the example fbs files in the repo. I'm looking for an example in javascript of encoding a format that includes a raw binary field. Is such a thing on the web somewhere?

Wouter van Oortmerssen

unread,
Aug 11, 2017, 6:30:43 PM8/11/17
to Travis Wellman, FlatBuffers
Certainly you should be able to use the general vector creation in JS, see e.g.
(see createInventoryVector).

But that would likely be very inefficient for larger arrays. I don't think we have an easy way to copy a byte array as-is, we should probably generate a special purpose function for that.

On Mon, Aug 7, 2017 at 3:20 PM, Travis Wellman <tra...@traviswellman.com> wrote:
I don't see any [byte] fields in the example fbs files in the repo. I'm looking for an example in javascript of encoding a format that includes a raw binary field. Is such a thing on the web somewhere?

--
You received this message because you are subscribed to the Google Groups "FlatBuffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flatbuffers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages