By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,466 Members | 1,202 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,466 IT Pros & Developers. It's quick & easy.

string.length to bytes

P: n/a
Tim
Hi,
What is the ratio between the number of characters in a file and its
filesize? I have a HTML-document with all tags and such written out in a
textarea and document.forms.myForm.elements.myTextarea.value.le ngth
is 5500 or so, and I want to predict how many the number of bytes it is
going to be once saved. Some tests gave me different results so I am
clueless.
Thanks,
Tim.

Jul 23 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a

"Tim" <sp******@thank.god> schreef in bericht
news:42***********************@news.wanadoo.nl...
Hi,
What is the ratio between the number of characters in a file and its
filesize? I have a HTML-document with all tags and such written out in a
textarea and document.forms.myForm.elements.myTextarea.value.le ngth
is 5500 or so, and I want to predict how many the number of bytes it is
going to be once saved. Some tests gave me different results so I am
clueless.
Thanks,
Tim.



Did you make a graph of it? plotting number of elements against file size,
I would simply draw a line fitting the points as good as possible
and make that line your prediction, unless off course the points are
behaving very non lineair, but I cannot imagine that.

grt Bert
Jul 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.