This class allows to mark regions in input data that may be replaced
by SHA1 hash or truncated if the number of symbols in that region exceeds
specified limit.
The new class supports two modes, transparent and abbreviating. In the
transparent mode the class behaves like usual stream, sending all input to
internal buffer. In the abbreviating mode it counts number of symbols in
input data. If the number is less than the specified limit, the input data
go to the buffer as in transparent mode. If the number exceeds the limit,
the input is replaced either by its hash or by truncated value.
The class is intended to be used for building object names or messages,
which may be arbitrary long. For instance, type names in IR may contain
template parameter names for template specializations. In some real life
cases these names can become really huge. By replacing long template
parameter sequence with a hash value, the type name remains compact and
still can identify the type across translation units.