mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-27 11:17:49 +02:00
restructure build to separate the 3 main components into 3 subdirectories
libi2pd for core libs libi2pd_client for i2pd client libs daemon for i2pd daemon libs
This commit is contained in:
parent
b3161dde93
commit
4cc3b7f9fb
140 changed files with 209 additions and 206 deletions
44
libi2pd/Gzip.h
Normal file
44
libi2pd/Gzip.h
Normal file
|
@ -0,0 +1,44 @@
|
|||
#ifndef GZIP_H__
|
||||
#define GZIP_H__
|
||||
|
||||
#include <zlib.h>
|
||||
|
||||
namespace i2p {
|
||||
namespace data {
|
||||
class GzipInflator
|
||||
{
|
||||
public:
|
||||
|
||||
GzipInflator ();
|
||||
~GzipInflator ();
|
||||
|
||||
size_t Inflate (const uint8_t * in, size_t inLen, uint8_t * out, size_t outLen);
|
||||
/** @note @a os failbit will be set in case of error */
|
||||
void Inflate (const uint8_t * in, size_t inLen, std::ostream& os);
|
||||
void Inflate (std::istream& in, std::ostream& out);
|
||||
|
||||
private:
|
||||
|
||||
z_stream m_Inflator;
|
||||
bool m_IsDirty;
|
||||
};
|
||||
|
||||
class GzipDeflator
|
||||
{
|
||||
public:
|
||||
|
||||
GzipDeflator ();
|
||||
~GzipDeflator ();
|
||||
|
||||
void SetCompressionLevel (int level);
|
||||
size_t Deflate (const uint8_t * in, size_t inLen, uint8_t * out, size_t outLen);
|
||||
|
||||
private:
|
||||
|
||||
z_stream m_Deflator;
|
||||
bool m_IsDirty;
|
||||
};
|
||||
} // data
|
||||
} // i2p
|
||||
|
||||
#endif /* GZIP_H__ */
|
Loading…
Add table
Add a link
Reference in a new issue