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

bzip2_compressor.hpp « coding - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: b94da4a68b483438df3e3b4d28409fa66b292383 (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(CompressBZip2Exception, StringCodingException);
DECLARE_EXCEPTION(DecompressBZip2Exception, StringCodingException);

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

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

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