mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-16 22:02:58 -06:00
25 lines
535 B
C++
25 lines
535 B
C++
#include <Core/Core.h>
|
|
|
|
using namespace Upp;
|
|
|
|
CONSOLE_APP_MAIN
|
|
{
|
|
FileOut out("u:/gztest/output.bin");
|
|
FileIn in;
|
|
|
|
if (!in.Open("u:/gztest/MedicalEnRu_abrv.idx.gz"))
|
|
return;
|
|
|
|
Buffer<char> index_data;
|
|
MemStream index_stream;
|
|
const int idx_file_size = 48;
|
|
|
|
// Preallocate memory and create a memory stream ...
|
|
index_data.Alloc(idx_file_size);
|
|
index_stream.Create(~index_data, idx_file_size);
|
|
|
|
GZDecompress(index_stream, in, in.GetLeft());
|
|
index_stream.Seek(0);
|
|
|
|
CopyStream(out, index_stream);
|
|
}
|