You will find your answer in IO/Core/vtkBase64Utilities.cxx
. Bytes are encoded by triplets, pairs, or singletons. Whenever you find one isolated =
, it is encoded by pair. When you find the pattern ==
, it is encoded by singleton. Everywhere else, it is encoded by triplet.
I suppose that the reason for this custom mapping was to be able to read more easily binary data when you open your file in a text editor, with a set of 64 human readable symbols, and no occurrence of Enter
, Tab
, or this kind of symbols that could pop up.
The file I pointed you to allows you to encode and decode data.