A method and apparatus for data encoding such as 3 to 4 encoding (base64,
uuencode etc.) is provided. Bytes of data to be encoded having negative
values are made positive while preserving the information to be encoded.
The positive values may be manipulated by addition (e.g. to a common
store) and bit shifting to efficiently obtain encoded data such as by
indexing an encoding alphabet.