jackxiao / jslibs

Automatically exported from code.google.com/p/jslibs
0 stars 0 forks source link

Create a class to handle binary data #35

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Currently, JavaScript string are used to store binary data.
Using JSString lead to a waste of memory because the JS engine inflate
every string to fit an UniCode string.
JS_NewString keep a copy of the 8-byte string and creates an additional
16-byte UC string. In this case, memory waste is x3.

Original issue reported on code.google.com by sou...@gmail.com on 27 Mar 2008 at 11:12

GoogleCodeExporter commented 9 years ago

Original comment by sou...@gmail.com on 27 Mar 2008 at 11:13

GoogleCodeExporter commented 9 years ago
BString in jslang (static) module

Original comment by sou...@gmail.com on 5 Jun 2008 at 9:59