10 lines
338 B
Python
Executable File
10 lines
338 B
Python
Executable File
#!/usr/bin/env python3
|
|
"""Compress one embedded HTTP asset without runtime work or timestamp churn."""
|
|
import gzip
|
|
import sys
|
|
from pathlib import Path
|
|
|
|
source, destination = map(Path, sys.argv[1:])
|
|
destination.parent.mkdir(parents=True, exist_ok=True)
|
|
destination.write_bytes(gzip.compress(source.read_bytes(), compresslevel=9, mtime=0))
|