Return value modifications.

Modified methods to always return current "usable" length of output
(mostly applies to encode() which needs to evaluate number of non-zero
characters for COBS byte code).