/
dinruspro
/
reference
Обзор
Документация
Войти
/
dinruspro
/
reference
Код
Запросы
0
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
main
Compression/Compression.cpp
50 строк
767 B
EnergonV
Справка по коду перекочевала в репозиторий (наконец-то!)
09 янв 2024, 19:20
09 янв 2024, 19:20
e333663
Код
Авторство
О чём код?
#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); }