OK, I've given away a lot of advice and scripts around here. Can anybody return the favor?!

I need a script that detects the user's download speed. I've seen of couple of examples on the web, but I'm stumped on a particular part.

Basically, the page that detects the speed uses JavaScript to start a timer, then there is some data to load in the middle, and another JavaScript to stop the timer. Then a few calculations are done on the start and end time, taking into consideration the size of the data, and you end up with a rough idea of the kilobytes per second the user is capable of.

The hard part: The data that loads in the middle is compressed binary, between comment tags. How do I get the compressed binary into my page? I've tried copying what I've seen, but it either prints out to the page (even though it's in comment tags), or it freaks out my editor to the point where I can't even work with the page anymore.

Confused? If not and you have any insight into this, please share! Thanks.