LZ4 compressed text is larger than uncompressed
问题 I have read that lz4 algorithm is very fast and has pretty good compression. But in my test app compressed text is larger than the source text. What is the problem? srand(time(NULL)); std::string text; for (int i = 0; i < 65535; ++i) text.push_back((char)(0 + rand() % 256)); cout << "Text size: " << text.size() << endl; char *compressedData = new char[text.size() * 2]; int compressedSize = LZ4_compress(text.c_str(), text.size(), compressedData); cout << "Compressed size: " << compressedSize <