dominictarr / mux-demux

mutiplex-demultiplex multiple streams through a single text Stream
MIT License
179 stars 15 forks source link

binary #26

Closed juliangruber closed 11 years ago

juliangruber commented 11 years ago

[15:50:41] actually I think binary mode should be the default [15:50:55] as a "real" stream/transport/socket supports binary [15:51:42] currently multilevel requires a binary capable stream, and i need to make an option {binary:false}, in which case it should encode buffers as base64 or anything else that behaves well [16:12:36] juliangruber: yes, I'd be happy to merge that -

will do

AaronO commented 11 years ago

Any updates on this ?

I currently need this given that I'm doing nested multiplexing (mux-demux on top of another mux-demux stream) as well as transporting binary data.

Is there a decent workaround I could use in the meantime ?

Thanks

nakosung commented 11 years ago

+1

juliangruber commented 11 years ago

This is fixed!

dominictarr commented 11 years ago

be warned though, that jsonb is base64's the data, so it expands. this is necessary when using with shoe/sockjs because binary is not yet supported. see: https://github.com/sockjs/sockjs-protocol/issues/74

nakosung commented 11 years ago

What about binary.js? It seems to offer better performance. 'mux-demux/binarypack' :)

    1. 1., 오후 9:35, Dominic Tarr notifications@github.com 작성:

be warned though, that jsonb is base64's the data, so it expands. this is necessary when using with shoe/sockjs because binary is not yet supported. see: sockjs/sockjs-protocol#74

— Reply to this email directly or view it on GitHub.

dominictarr commented 11 years ago

@nakosung I would certainly merge a pull request adding binary-pack encoding!

dominictarr commented 11 years ago

would be great to see perf difference between it and msgpack

nakosung commented 11 years ago

FYI, unfortunately, I'm not in a hurry with new binary.js thing for now. Maybe months later I will need 'the better performance'. Currently I'm happy with utf-8 stream for prototyping.

    1. 2., 오후 5:22, Dominic Tarr notifications@github.com 작성:

would be great to see perf difference between it and msgpack

— Reply to this email directly or view it on GitHub.