reorganizing repo

git-svn-id: svn://ultimatepp.org/upp/trunk@9206 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2015-11-22 11:23:48 +00:00
parent 7d17505cfe
commit e3e8d627f5
3840 changed files with 0 additions and 1161578 deletions

View file

@ -1,48 +0,0 @@
#include <Core/Core.h>
#include <plugin/lz4/lz4.h>
using namespace Upp;
CONSOLE_APP_MAIN
{
String h = "This is some line that is to be compressed";
h << h;
h << h;
h << h;
h << h;
DUMP(h);
String path = "c:/xxx/test.zc";
{
FileOut fout(path);
fout.Put("COMPRESSED");
int64 pos = fout.GetPos();
fout.Put64le(pos);
Lz4 zlib;
OutFilterStream out(fout, zlib);
zlib.Compress();
out % h;
int ob = out.GetPos();
out.Close();
fout.Seek(pos);
fout.Put64le(out.GetPos());
}
{
String h2;
FileIn fin(path);
if(fin.GetSize() < 14)
return;
String hdr = fin.Get(10);
if(hdr != "COMPRESSED")
return;
int sz = fin.Get64le();
DDUMP(sz);
Lz4 zlib;
InFilterStream in(fin, zlib);
in.SetSize(sz);
zlib.Decompress();
in % h2;
DUMP(h2);
}
}