mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
forgot to commit Base.cpp changes
This commit is contained in:
parent
d0ea59c568
commit
21090eaa39
1 changed files with 8 additions and 1 deletions
9
Base.cpp
9
Base.cpp
|
@ -327,7 +327,14 @@ namespace data
|
|||
LogPrint (eLogError, "Compression error ", err);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// from https://stackoverflow.com/questions/1533113/calculate-the-size-to-a-base-64-encoded-message
|
||||
size_t Base64EncodingBufferSize(const size_t input_size) {
|
||||
const size_t code_size = ((input_size * 4) / 3);
|
||||
const size_t padding_size = (input_size % 3) ? (3 - (input_size % 3)) : 0;
|
||||
return code_size + padding_size;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue