Real GZIP compression
This creates a standard GZIP stream for a single file. It is different from TAR.GZ, which packages multiple files inside TAR first.
Safe limits
Files are limited to 25 MB. Compression requires local CompressionStream support; unsupported browsers fail clearly instead of uploading the file.
Safe filenames and verification
The output filename is checked before compression. Unsafe source names are rejected, rather than producing a misleading GZIP download. The compressed data is decompressed and compared byte for byte with the source; this does not scan the contents for malware.