11 #ifndef __UT_ZString__
12 #define __UT_ZString__
49 static const char *style(Style
s);
51 static Style style(
const char *
s);
58 compress(src, style,
level);
69 bool force_compressed=
false)
71 setCompressedData(src, style, original_size, force_compressed);
97 bool force_compressed=
false);
118 int64 mem = inclusive ?
sizeof(*this) : 0;
119 return mem += myString.getMemoryUsage(
false);
124 SYShashCombine(h, mySize);
125 SYShashCombine(h, myStyle);
131 return mySize == s.mySize
132 && myStyle == s.myStyle
133 && myString == s.myString;
140 Style myStyle =
NONE;
GLdouble GLdouble GLdouble z
std::size_t SYS_HashType
Define the type for hash values.
Style compressedStyle() const
SYS_HashType hash() const
void clear()
Clear storage and reset values.
const UT_StringHolder & compressedString() const
GLfloat GLfloat GLfloat GLfloat h
bool operator==(const UT_ZString &s) const
UT_ZString(const UT_StringRef &src, Style style=GZIP, int level=9)
Take an uncompressed string and store the compressed result.
UT_ZString(const UT_StringRef &src, Style style, const UT::source_is_compressed &, exint original_size, bool force_compressed=false)
exint originalSize() const
friend std::size_t hash_value(const UT_ZString &s)
SYS_FORCE_INLINE bool isstring() const
The z-string has a string if the original size is non-zero.
int64 getMemoryUsage(bool inclusive) const