[Paraview] Base64 encoding

Brad King brad.king at kitware.com
Thu Feb 15 10:06:38 EST 2007


Craig Warren wrote:
> Do data arrays for inline binary data have to start with a 'b' char 
> before the actual data. I'm still having trouble getting anything apart 
> from ascii data to work correctly with Paraview!

The inline binary data are pure base64 encoded with no special prefix. 
However there are more values stored than just the raw scalar data.  You 
can look in the VTK/IO/vtkXMLDataParser.cxx source file at the method 
vtkXMLDataParser::ReadUncompressedData to see how uncompressed binary 
data are read.

First a 32-bit unsigned integer value is read that specifies the length 
of the rest of the data in bytes.  Note that the DataStream member 
abstracts the view of the base64 encoding so the length is in unencoded 
bytes.  In your case the value should be 8 since there are 8 unsigned 
char values.

-Brad


More information about the ParaView mailing list