mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2024-11-17 21:26:04 +00:00
rollback
This commit is contained in:
parent
a32d82f05b
commit
0af963359a
@ -177,6 +177,7 @@ namespace stream
|
|||||||
if (buf[9] == 6) // streaming protocol
|
if (buf[9] == 6) // streaming protocol
|
||||||
{
|
{
|
||||||
// unzip it
|
// unzip it
|
||||||
|
CryptoPP::Gunzip m_Decompressor;
|
||||||
m_Decompressor.Put (buf, length);
|
m_Decompressor.Put (buf, length);
|
||||||
m_Decompressor.MessageEnd();
|
m_Decompressor.MessageEnd();
|
||||||
Packet * uncompressed = new Packet;
|
Packet * uncompressed = new Packet;
|
||||||
@ -202,6 +203,7 @@ namespace stream
|
|||||||
I2NPMessage * StreamingDestination::CreateDataMessage (const uint8_t * payload, size_t len)
|
I2NPMessage * StreamingDestination::CreateDataMessage (const uint8_t * payload, size_t len)
|
||||||
{
|
{
|
||||||
I2NPMessage * msg = NewI2NPShortMessage ();
|
I2NPMessage * msg = NewI2NPShortMessage ();
|
||||||
|
CryptoPP::Gzip m_Compressor;
|
||||||
if (len <= COMPRESSION_THRESHOLD_SIZE)
|
if (len <= COMPRESSION_THRESHOLD_SIZE)
|
||||||
m_Compressor.SetDeflateLevel (CryptoPP::Gzip::MIN_DEFLATE_LEVEL);
|
m_Compressor.SetDeflateLevel (CryptoPP::Gzip::MIN_DEFLATE_LEVEL);
|
||||||
else
|
else
|
||||||
|
@ -65,8 +65,8 @@ namespace stream
|
|||||||
|
|
||||||
std::function<void (Stream *)> m_Acceptor;
|
std::function<void (Stream *)> m_Acceptor;
|
||||||
|
|
||||||
CryptoPP::Gzip m_Compressor;
|
//CryptoPP::Gzip m_Compressor;
|
||||||
CryptoPP::Gunzip m_Decompressor;
|
//CryptoPP::Gunzip m_Decompressor;
|
||||||
};
|
};
|
||||||
|
|
||||||
class StreamingDestinations
|
class StreamingDestinations
|
||||||
|
Loading…
Reference in New Issue
Block a user