https://github.com/kmozurkewich/zip-packer
small zip file packer. provide minimum archive size and pack your directory.
https://github.com/kmozurkewich/zip-packer
archiver file file-packing go golang storj zip
Last synced: 3 months ago
JSON representation
small zip file packer. provide minimum archive size and pack your directory.
- Host: GitHub
- URL: https://github.com/kmozurkewich/zip-packer
- Owner: kmozurkewich
- License: apache-2.0
- Created: 2025-06-13T04:23:18.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-06-13T19:41:02.000Z (about 1 year ago)
- Last Synced: 2026-03-28T00:37:22.777Z (3 months ago)
- Topics: archiver, file, file-packing, go, golang, storj, zip
- Language: Go
- Homepage:
- Size: 12.7 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# zip‑packer
Prototype CLI that partitions an arbitrary set of files into ZIP archives, each at least a minimum size.
## Build
```bash
go build ./cmd/zip-packer
```
## Usage
```
zip-packer -size 2048 -out backup
```
* **``** [required] Positional argument: root directory containing files to pack.
* **`-size`** [required] Minimum size *per* archive in **MiB**. Archives will be at least this size (except possibly the last one if the remaining data is smaller).
* **`-out`** [optional] Base name for output archives (`backup_1.zip`, `backup_2.zip`, etc…).
The tool applies a greedy best‑fit‑decreasing bin‑packing heuristic followed by a balancing pass to ensure every archive ≥ **size**. If the first file of an archive is > **size** then the archive will have a single file.
## Example
```
zip-packer -size 64 /data/
```
Creates:
archive_1.zip
archive_2.zip
archive_3.zip