27 lines
775 B
C++
27 lines
775 B
C++
#include "pip.h"
|
|
#include "picompress.h"
|
|
|
|
|
|
int main(int argc, char *argv[]) {
|
|
PIString s = PIString::fromUTF8("hello, привет привет привет привет привет привет");
|
|
PIByteArray ba = s.toUTF8();
|
|
piCout << "original " << ba.toHex();
|
|
ba = piCompress(ba);
|
|
piCout << "compress " << ba.toHex();
|
|
ba = piDecompress(ba);
|
|
piCout << "decompress" << ba.toHex();
|
|
piCout << PIString::fromUTF8(ba);
|
|
ba = PIByteArray(160);
|
|
piCout << ba.toHex() << ba.size();
|
|
piCout << piCompress(ba).toHex() << piCompress(ba).size();
|
|
/*PIString s = PIString::fromUTF8("hello, привет");
|
|
piCout << s;
|
|
PIByteArray ba = s.toUTF8();
|
|
piCout << ba.toHex();
|
|
PIString s2;
|
|
s2 = PIString::fromUTF8(ba);
|
|
piCout << s2;*/
|
|
return 0;
|
|
}
|
|
|