compress_string
Compresses a string using GZIP and optionally injects a randomized filename into the GZIP header to modify the output's byte structure.
def compress_string(
s: str | bytes,
max_random_bytes: int | None = None
) - > bytes
Compresses a string using GZIP and optionally injects a randomized filename into the header to vary the output's binary representation.
Parameters
| Name | Type | Description |
|---|---|---|
| s | `str | bytes` |
| max_random_bytes | `int | None` = None |
Returns
| Type | Description |
|---|---|
bytes | The GZIP-compressed byte string, potentially containing a randomized filename field in the header. |