I need to write some data from a computation, that will be read later by Paraview (.vtu or vtk file).When it comes to file size , should I go for the ASCII format or the Binary format ?
Binary vs. ASCII file size
data visualization;paraview;vtk
If your only worry is file size, then you want binary files.  For an illustrative example, lets assume you are writing 1 double precision floating point number to a file.  Let's assume that the file system can handle this perfectly and holding the file, headers, and padding are all 0.For a binary file, that number would take the exact size of the number in RAM, or 8 bytes.In ASCII format, it would hold:16 digits of the base  1 period for the decimal  1 char to delimit the exponent  1 char for the sign of the exponent  2-3 char for the exponentAssuming it uses only 1 byte for a character, That is 22 bytes to hold the same number.  This doesn't count the characters required to dilimit between numbers (usually atleast 1).  Therefore file size for ASCII format will be about 3 times larger.You can trade in file size for the precision in the stored files (only keep 5-6 digits in the base), but that depends on what you are using them for.  The main advantage of ASCII is for debugging or producing human readable data.