Using TCardinality

TCardinality 's use is best explained by an example:

If an integral value that needs externalising is known to be non-negative and cannot exceed 2^29 (e.g. the length of a descriptor) - instead of storing a 32-bit value in the stream, you can use TCardinality to compress the external format. So instead of


you would use

      writeStream << TCardinality(myValue);
TCardinality c;
readStream >> c;