zipper

module
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 9, 2022 License: GPL-3.0

README

Zipper Go Report Card

zipper logo

zipper create multiple zip files of X MB

for my friend savan

Views

Usage

zipper <size> <target>
  • Size in KB. Default 3000 which is 3MB
  • target: folder/directory to compress

Local

Create docker buildx builder if using first time docker buildx create --use

slim variant is UPX compressed

git clone --depth 1 https://github.com/pratikbalar/zipper.git zipper
cd zipper

## Get zipper binary
docker buildx bake

## Get slim zipper binary
docker buildx bake artifact-slim

## Get slim and standard multi-platform zipper binaries
docker buildx bake artifact-all

Check dist directory for binaries

## Build image
docker buildx bake image

## Build slim image
docker buildx bake image-slim

## Build multi-platform image
docker buildx bake image-all

## Build multi-platform slim image
docker buildx bake image-all-slim

Container image availabel for

  • linux: amd64, 386, arm64, riscv64, ppc64le, s390x, mips64le, mips64, arm/v7, arm/v6

  • windows: available soon

Image available for

  • linux: amd64, 386, arm64, riscv64, ppc64le, s390x, mips64le, mips64, arm/v7, arm/v6

  • darwin: amd64(Intel), arm64 (M1)

  • windows: amd64, 386, arm64, arm

  • freebsd: amd64, 386, arm64, arm

Debug

Testing
go test -v ./...
go test -v -race ./...
Profiling
go build -ldflags="-X main.profEnable=true" ./cmd/zipper/
./zipper 10000 /home/pratik/workspace/pratikbalar/zipper/test
CPU and Memory profiling
go tool pprof -http=:8080 mem.pprof
Tracing
go tool trace trace.out
Icons made by Freepik from www.flaticon.com

To-Do

  • Use existing buffer for zip
  • Replace queue with channels
  • Create zipping worker with channels
  • Add structured logging <TYPE>: <TIME> :
  • Check goroutine leak
  • Don't change source dir name
  • Configure size of zip from env cli
  • docs: mkdocs CI
  • What if photo size is less then given zip size
  • Go routines to handle zipping
  • Testing
    • e2e
  • README Badges

May the source be with you

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL