if you need to support old browsers or handle more than thumbnail-amounts of data, it REALLY pays to shop around.
some user-land routines are literally 200X faster than others in jscript, and some of them don't like unicode or binary very much.
i won't endorse or condemn any prior suggestions, but you should try a few different ones in your project to see what's best.
BROWSER STATS [% share]
(2013/12/12) IE7:0.3, IE8:7.5, IE11:4.3, IE9:4.6, IE10:7.8, FF:18, CH:43, SF:5.5, MOBILE:21.5