file · Command reference
qzx compressZip
What it does
Compresses a directory or file into a ZIP archive with custom exclusion rules
Canonical command: compressZip
Accepted aliases: None
Case-sensitive: no
Included in the published package
Available in PyPI 0.2.2.0.2. This page documents the 0.2.2.0.2 alpha development checkout.
Safety and effects
Can mutate state
No documented dry-run parameter
No native program invocation in the current classification
No documented network use
No inherent elevation requirement
This safety classification was reviewed against implementation digest sha256:651a7f9a88ee02539960b1bfe07593de7f15d2a0d4d8f1aad0caad3a9ab0fbbe on 2026-07-24.
Exact syntax
qzx compressZip <zip_path> <source_path> [exclude_patterns] --jsonParameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| zip_path | str | Yes | Not declared | Target path for the created ZIP archive (e.g. project.zip) |
| source_path | str | Yes | Not declared | Local file or directory to compress |
| exclude_patterns | str | No | ".git,node_modules,__pycache__,.venv,env,dist,build" | Comma-separated folders, files, or wildcards to exclude (defaults to standard caches) |
Input examples
qzx compressZip project.zip .Compress the current directory into project.zip, excluding standard build folders
qzx compressZip src.zip srcCompress the src folder into src.zip
For the complete structured payload, add --json: qzx compressZip <zip_path> <source_path> [exclude_patterns] --json
Representative output example
This illustrative JSON is derived from the current implementation-backed result contract. It shows what the command can return without claiming a recorded execution; values vary with inputs, host, permissions, and optional tools.
Example command: qzx compressZip project.zip . --json
{
"success": true,
"message": "Compresses a directory or file into a ZIP archive with custom exclusion rules. In this illustrative example, the command completed successfully.",
"compressed_bytes": 4096,
"compression_ratio_percent": 42.7,
"files_archived": "C:\\project\\example.txt",
"original_bytes": 4096,
"source_path": "C:\\project\\example.txt",
"zip_path": "C:\\project\\example.txt"
}View the JSON result contract
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"required": [
"success",
"message"
],
"properties": {
"success": {
"type": "boolean"
},
"message": {
"type": "string"
},
"compressed_bytes": [],
"compression_ratio_percent": [],
"error": {
"type": "string"
},
"files_archived": [],
"original_bytes": [],
"source_path": [],
"zip_path": []
},
"additionalProperties": true
}Errors and limits
The public contract requires success=false and a descriptive message on failure. This catalog does not yet declare a command-specific error taxonomy; inspect the result and do not invent error codes.
QZX is alpha software. Optional dependencies, permissions, and host capabilities can change the result.
Evidence workflow: requires an isolated disposable target.
Evidence and provenance
- Implementation
- src/qzx/commands/file/compress_zip.py
- Documentation channel
- Development documentation 0.2.2.0.2 · main · sha256:319b16857a87636ebc3b89734cc040a737bb56194464fca33ce73bdae2043096
- Availability
- 0.2.2.0.2 or earlier
Keep exploring
Related commands
These commands also belong to the file category. Compare them to choose the operation that best fits your task.
qzx changePermissionsChanges permissions of a file or directoryqzx copyFileCopies a file or directory from source to destinationqzx touchFileCreates an empty file or updates the timestamp of an existing fileqzx countLinesInFileCounts the number of lines in files with support for wildcards and recursive searching