Home » U++ Library support » U++ Core » Bugfix: GZCompressFile() and GZDecompressFile() not crashing on files bigger than 2 GB
Bugfix: GZCompressFile() and GZDecompressFile() not crashing on files bigger than 2 GB [message #52828] |
Sun, 08 December 2019 02:28 |
zsolt
Messages: 693 Registered: December 2005 Location: Budapest, Hungary
|
Contributor |
|
|
bool GZCompressFile(const char *dstfile, const char *srcfile, Gate<int64, int64>progress)
{
FileIn in(srcfile);
if(!in)
return false;
FileOut out(dstfile);
if(!out)
return false;
- if(GZCompress(out, in, (int)in.GetLeft(), progress) < 0)
+ if(GZCompress(out, in, in.GetLeft(), progress) < 0)
return false;
out.Close();
return !out.IsError();
}
bool GZDecompressFile(const char *dstfile, const char *srcfile, Gate<int64, int64>progress)
{
FileIn in(srcfile);
if(!in)
return false;
FileOut out(dstfile);
if(!out)
return false;
- if(GZDecompress(out, in, (int)in.GetLeft(), progress) < 0)
+ if(GZDecompress(out, in, in.GetLeft(), progress) < 0)
return false;
out.Close();
return !out.IsError();
}
Tested with MSC2017 32 bit
[Updated on: Sun, 08 December 2019 02:29] Report message to a moderator
|
|
|
|
Goto Forum:
Current Time: Fri Mar 29 11:57:11 CET 2024
Total time taken to generate the page: 0.01288 seconds
|