i've asked jdolecek@ about this, but got no reply.
'size' parameter), and adjust callers appropriately
but modified to be slightly more forgiving for invalid sequencies, and to gracefully handle end of string in middle of decoded sequence