15 #ifndef __KMIME_CHARFREQ_H__
16 #define __KMIME_CHARFREQ_H__
18 #include <tqcstring.h>
19 #include <tdemacros.h>
24 class TDE_EXPORT CharFreq {
26 CharFreq( const TQByteArray & buf );
27 CharFreq( const char * buf, size_t len );
29 enum Type { None = 0, EightBitData, Binary = EightBitData,
30 SevenBitData, EightBitText, SevenBitText };
33 bool isEightBitData() const;
34 bool isEightBitText() const;
35 bool isSevenBitData() const;
36 bool isSevenBitText() const;
39 bool hasTrailingWhitespace() const;
41 bool hasLeadingFrom() const;
44 float printableRatio() const;
47 float controlCodesRatio() const;
63 void count( const char * buf, size_t len );
|