change gzipped detection

This commit is contained in:
Daniel Eisenberg
2025-09-30 09:58:55 +03:00
parent 6b9abf6122
commit 459ce3478f
9 changed files with 180 additions and 11 deletions

View File

@@ -1912,6 +1912,14 @@ base64Decode(const string &input)
return out;
}
bool
isGzipped(const string &stream)
{
if (stream.size() < 2) return false;
auto unsinged_stream = reinterpret_cast<const u_char *>(stream.data());
return unsinged_stream[0] == 0x1f && unsinged_stream[1] == 0x8b;
}
bool
containsInvalidUtf8(const string &payload)
{