I think - but I'm not 100% certain - that tcl-lib is where Vinod got the uuencoder. I forget how much faster the ns_uuencode routine was once he got it fixed (UTF8 broke it for Tcl8) - I think four orders of magnitude is an UNDERstatement...
Yeah, the tcl code that I'm using is from tcllib. Unfortunately, I made a mistake when I tested the code initially. So, while I told Don that the fixed ns_uuencode was MUCH, MUCH faster than tcllib, it's actually only about 60 times faster. (Sorry, Don!). Most of the time is spent while splitting the string into 48-byte pieces to be sent to ns_uuencode. When I move that task inside ns_uuencode so that you can send arbitrary length strings to ns_uuencode, then ns_uuencode is about 2000 times faster.
Does anyone have the ability to return binary data from aolserver to the browser?
I think this requires that ns_return and ns_write be rewritten as Tcl_ObjCmdProcs. This is what I did for ns_uuencode, and it wouldn't be too hard to make this change for those procs as well (I think).