more functions in B-encode, to compute the size of an
expression in bytes, and write it into an already-existing string