https://github.com/savjee/independent-zipper
Create independent zip archives of a given size
https://github.com/savjee/independent-zipper
Last synced: 3 months ago
JSON representation
Create independent zip archives of a given size
- Host: GitHub
- URL: https://github.com/savjee/independent-zipper
- Owner: Savjee
- License: mit
- Created: 2022-01-27T13:56:44.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-01-28T13:43:23.000Z (over 4 years ago)
- Last Synced: 2025-01-17T06:46:34.786Z (over 1 year ago)
- Language: Python
- Size: 1.95 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Independent Zipper
Simple Python script that zips a directory into independently extracteable zip files of a given size (approximately).
## Usage
Take the folder `my_folder` and compress it into zip files of around 1000MB:
```
python3 independent-zipper.py --input-path my_folder --output_path zips --max-size 1000
```
The output of this script looks like this:
```
part0.zip
part1.zip
part2.zip
...
```
Each zip file can be extracted independentaly.
## Notes
A few things to note about this script:
* This is a very naive implementation. It goes over all files in the `--input-path` and adds them to a zip file until it has processed the maximum amount of megabytes. At that point it will create a new zip file and keep going.
* Zip files can be smaller than the `--max-size`. That's because the script only looks at the original file size, not the compressed size. So highly-compressible data will yield smaller than expected zip files.
* Zip files can be larger than expected if an individual file exceed `--max-size`.