Have you try using nsIBinaryInputStream?

Ep Dagger wrote:
How does one go about reading a binary stream into javascript? I've
hacked the xpcom-connection.js code from chartzilla but
nsIScriptableInputStream chokes on '0'. I guess this is because it is
assuming a 0 terminated c string for the inputstream. Is there another
object I can create and interface with to read a buffer/stream as
integers/bytes?

This is all assuming you can have binary strings in JavaScript1.5. You
can use '\xXX to insert bytes & charCodeAt to retieve them so I
assuming you can.

What other options do I have to interface with a binary (socket)
stream, protozilla, write my own protocol, a custom xpcom/xpconect
object?

Thanks

--
Mike Lee
Website: http://www.exitspace.net/mike


Reply via email to