Nice post and useful toolkit.
I notice that the function definitions in your ADD.SQL script use varchar(2000) rather than varchar(max). Are there limits on the size of the data that can be passed to the base64encode and base64decode procedures? From a brief look at the .cpp files, it would seem like there are not limits, but I did not do a thorough code review. Would be helpful to know that these routines can arbitrarily large strings.