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...
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 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'm trying to make a javascript emulator, and i'd like it to be very light, so I don't want to load the "ROMs" with jQuery and jDataView. Si I made my own ROM loader in pure JS.  It works pretty well (thanks to many topics on this...
I have a function in JavaScript which is expecting a byte array to be passed into it from Native C++ code. For example:  function OnEvent(event, data1) {      console.log("data1[0] = " + data1[0]); }   I would like for it to print 0x55 or eve...
I am getting arrayBuffur from WebSocket connection, and I can get range of byte arrays that is  Guid created in c#.   How I can convert this guid bytes to string in javascript?  Guid="FEF38A56-67A9-46DF-B7D8-C52191CD70F4"  Bytes=[86, 138, 243...
I need to convert an array of 8 bytes into a double.  This is my starting array:  [170, 85, 255, 63, 205, 171, 170, 85]   and it should convert to -9.591053231630682E-105.  Each element of the array can be from 0 to 256....
Having problems with TextDecoder decoding Uint8Array. (background info)  var staring = "hello"; var array = new Uint8Array(2); array[0]=255; array[1]=0; var binary=(new TextDecoder("utf-8")).decode(array) console.log(binary);   Should...
Let's say I have a hexadecimal, for example "0xdc", how do I convert this hexadecimal string to a hexadecimal Number type in JS?   Literally just losing the quotes. The Number() constructor and parseInt() just converted it to an integer b...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.