diff options
author | B Stack <bgstack15@gmail.com> | 2019-04-15 12:34:36 +0000 |
---|---|---|
committer | B Stack <bgstack15@gmail.com> | 2019-04-15 12:34:36 +0000 |
commit | bac0deab0f1b7ae8845514970284637f2e9faa68 (patch) | |
tree | f759fbac3eced54ff7ce3ac6fdd0c2ea6c2b053c /wx+/zlib_wrap.cpp | |
parent | Merge branch '10.10' into 'master' (diff) | |
parent | remove files deleted in upstream (diff) | |
download | FreeFileSync-bac0deab0f1b7ae8845514970284637f2e9faa68.tar.gz FreeFileSync-bac0deab0f1b7ae8845514970284637f2e9faa68.tar.bz2 FreeFileSync-bac0deab0f1b7ae8845514970284637f2e9faa68.zip |
Merge branch '10.11' into 'master'10.11
10.11
Latest changes:
* Last FreeFileSync version supporting Windows XP and Vista
* Fixed crash on multi-monitor set
* Fixed dialogs not showing after opening UAC prompt
* Support launching through symlink (Linux)
* Added example desktop starter files (Linux)
* Fixed misleading error when determining file permissions support
* Updated wxWidgets, libcurl, libssh2, VS, GCC, Xcode
See merge request opensource-tracking/FreeFileSync!8
Diffstat (limited to 'wx+/zlib_wrap.cpp')
-rwxr-xr-x | wx+/zlib_wrap.cpp | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/wx+/zlib_wrap.cpp b/wx+/zlib_wrap.cpp deleted file mode 100755 index fbbe2f09..00000000 --- a/wx+/zlib_wrap.cpp +++ /dev/null @@ -1,53 +0,0 @@ -// ***************************************************************************** -// * This file is part of the FreeFileSync project. It is distributed under * -// * GNU General Public License: https://www.gnu.org/licenses/gpl-3.0 * -// * Copyright (C) Zenju (zenju AT freefilesync DOT org) - All Rights Reserved * -// ***************************************************************************** - -#include "zlib_wrap.h" -//Windows: use the SAME zlib version that wxWidgets is linking against! //C:\Data\Projects\wxWidgets\Source\src\zlib\zlib.h -//Linux/macOS: use zlib system header for both wxWidgets and Curl (zlib is required for HTTP) -// => don't compile wxWidgets with: --with-zlib=builtin -#include <zlib.h> - -using namespace zen; - - -size_t zen::impl::zlib_compressBound(size_t len) -{ - return ::compressBound(static_cast<uLong>(len)); //upper limit for buffer size, larger than input size!!! -} - - -size_t zen::impl::zlib_compress(const void* src, size_t srcLen, void* trg, size_t trgLen, int level) //throw ZlibInternalError -{ - uLongf bufferSize = static_cast<uLong>(trgLen); - const int rv = ::compress2(static_cast<Bytef*>(trg), //Bytef* dest, - &bufferSize, //uLongf* destLen, - static_cast<const Bytef*>(src), //const Bytef* source, - static_cast<uLong>(srcLen), //uLong sourceLen, - level); //int level - // Z_OK: success - // Z_MEM_ERROR: not enough memory - // Z_BUF_ERROR: not enough room in the output buffer - if (rv != Z_OK || bufferSize > trgLen) - throw ZlibInternalError(); - return bufferSize; -} - - -size_t zen::impl::zlib_decompress(const void* src, size_t srcLen, void* trg, size_t trgLen) //throw ZlibInternalError -{ - uLongf bufferSize = static_cast<uLong>(trgLen); - const int rv = ::uncompress(static_cast<Bytef*>(trg), //Bytef* dest, - &bufferSize, //uLongf* destLen, - static_cast<const Bytef*>(src), //const Bytef* source, - static_cast<uLong>(srcLen)); //uLong sourceLen - // Z_OK: success - // Z_MEM_ERROR: not enough memory - // Z_BUF_ERROR: not enough room in the output buffer - // Z_DATA_ERROR: input data was corrupted or incomplete - if (rv != Z_OK || bufferSize > trgLen) - throw ZlibInternalError(); - return bufferSize; -} |