Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gzip_compressor.hpp « coding - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: ad6ba9de6dfd027a291cb9d8919d64eb35897e91 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#pragma once
#include "coder.hpp"
#include "../base/base.hpp"
#include "../base/exception.hpp"

DECLARE_EXCEPTION(CompressGZipException, StringCodingException);
DECLARE_EXCEPTION(DecompressGZipException, StringCodingException);

// Throws CompressGZipException on error.
void CompressGZip(int level, char const * pSrc, size_t srcSize, string & dst);

// Throws DecompressGZipException on error.
void DecompressGZip(char const * pSrc, size_t srcSize, string & dst);

// Returns -1 if dstSize is too small, otherwise the size of pDst used.
// Throws DecompressGZipException on error.
size_t DecompressGZipIntoFixedSize(char const * pSrc, size_t srcSize, char * pDst, size_t dstSize);