pub fn compress_log(scrubbed_text: &str) -> Result<Vec<u8>, Error>Expand description
Gzip-compress scrubbed log text into a byte buffer.
Uses flate2::write::GzEncoder with default compression (level 6),
which balances speed and ratio well for the 1-20 MB text files produced
by Arena’s Player.log.
§Errors
Returns std::io::Error if compression fails.
§Examples
use manasight_parser::util::compress_log;
let compressed = compress_log("some log data").unwrap();
// Output is valid gzip (magic bytes 0x1f 0x8b)
assert_eq!(compressed[0], 0x1f);
assert_eq!(compressed[1], 0x8b);