L
Laurent Vogel
hello,
I'm writing a script which needs about 60 kbytes of text data.
Currently it looks like:
function1("small string1");
function2("small string2");
function1("small string3");
and so on. In order to have it loaded more quickly, I'm considering
actually puting all the data in one big string (something like:
1<small string1>2<small string2>1<small string3>...
) and compress it (using a naive compression approach, I can
shrink the 60 kb down to approximately 20 kb, plus 2 or 3 lines of
javascript code to decompress the stuff). Now the question is:
QUESTION:
---------
Is it okay to have a statement like:
mystring = "blablabla\
blablabla\
blablabla";
with 20 kilo bytes of binary blablabla ? What characters may I use in
the string? (can I use any bytes from 1 to 255, or should I restrict
to the printable subset of ISO latin 1) ?
Thanks for any answers,
Laurent Vogel
I'm writing a script which needs about 60 kbytes of text data.
Currently it looks like:
function1("small string1");
function2("small string2");
function1("small string3");
and so on. In order to have it loaded more quickly, I'm considering
actually puting all the data in one big string (something like:
1<small string1>2<small string2>1<small string3>...
) and compress it (using a naive compression approach, I can
shrink the 60 kb down to approximately 20 kb, plus 2 or 3 lines of
javascript code to decompress the stuff). Now the question is:
QUESTION:
---------
Is it okay to have a statement like:
mystring = "blablabla\
blablabla\
blablabla";
with 20 kilo bytes of binary blablabla ? What characters may I use in
the string? (can I use any bytes from 1 to 255, or should I restrict
to the printable subset of ISO latin 1) ?
Thanks for any answers,
Laurent Vogel