Home » U++ Library support » U++ Core » Zlib problem
|
|
Re: Zlib problem [message #51467 is a reply to message #51466] |
Thu, 28 March 2019 17:50 |
Novo
Messages: 1358 Registered: December 2006
|
Ultimate Contributor |
|
|
Below is a fixed version which works in both Release and Debug configurations.
#include <Core/Core.h>
#include <plugin/lz4/lz4.h>
#include <plugin/zstd/zstd.h>
using namespace Upp;
CONSOLE_APP_MAIN
{
StdLogSetup(LOG_FILE|LOG_COUT);
String cpath = GetHomeDirFile("test");
{
FileOut out(cpath);
ZCompressStream z(out);
z.Put("Compressed by zlib");
}
{
FileIn in(cpath);
ZDecompressStream z(in);
RLOG(z.GetLine());
}
{
FileOut out(cpath);
LZ4CompressStream z(out);
z.Put("Compressed by LZ4");
}
{
FileIn in(cpath);
LZ4DecompressStream z(in);
RLOG(z.GetLine());
}
{
FileOut out(cpath);
ZstdCompressStream z(out);
z.Put("Compressed by Zstd");
}
{
FileIn in(cpath);
ZstdDecompressStream z(in);
RLOG(z.GetLine());
}
FileDelete(cpath);
}
Regards,
Novo
[Updated on: Thu, 28 March 2019 17:50] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Fri Apr 26 16:07:45 CEST 2024
Total time taken to generate the page: 0.02772 seconds
|