I have a javascript string which is about 500K when being sent from the server in UTF-8. How can I tell its size in JavaScript?  I know that JavaScript uses UCS-2, so does that mean 2 bytes per character. However, does it depend on the JavaScript i...
I'm going to be storing a large array of byte values (most likely over a million) in Javascript. If I use a normal array with normal numbers, that will take 8 MB, because numbers are stored as IEEE doubles, but if I can store it as bytes, it wi...
Anyone know how I would convert bytes which are sent via a websocket (from a C# app) to an image? I then want to draw the image on a canvas. I can see two ways of doing this:     Somehow draw the image on the canvas in byte form without converting it...
I want to split a 64bit integer into two 32bit integers:  var bigInt = 0xffffff;  var highInt = bigInt >> 8 // get the high bits 0xfff var lowInt = bigInt // cut of the first part (with &)?  console.log(highInt); // 0xfff console.log(lowInt...
I have an array in Javascript that has lot of sub arrays. What would be the best/simplest way to count how many bits/bytes the array holds? I'm gonna send the array to my PHP server, and it can only be 5kB big.  Is there a native method for this?...
I had wrote a node/ssjs program that makes:   Tcp connection to data server(Apache MIMA), using TLS module. (OK) Encode/decode(serialize/deserialize) messages through protobuffer module.. (OK) Send serialized message to server and get response. (Not...
I got this code to covert size in bytes via PHP.  Now I want to convert those sizes to human readable sizes using JavaScript. I tried to convert this code to JavaScript, which looks like this:  function formatSizeUnits(bytes){   if      (bytes >=...
I'm parsing a binary file in javascript that is storing two pieces of information per byte, one per nibble. The values are, of course, 0-16 and 0-16.  In all other parts of the file format, each byte represents one piece of information, so I have...
I can't figure out to send byte array while being connected to server on Debian. Is there any alternative to sending string via client.write()? I tried client.write(new Buffer("something")) but this gives Invalid data error. Here is my co...
I am trying to determine what encoding scheme will give me the numbers -1 or -40 (the starting numbers for the file) for a jpeg file type.  A rest api I'm working on is expecting a byte array that looks like [-1, 94, 43, 34, etc]. In node.js I ca...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.