minizip

vb minizip [OPTIONS] ZIPFILE [FILES...]

Description

Compress or decompress files in a ZIP archive.

Options

-l, --list

List files in the archive

-x, --extract

Extract files from the archive

-r, --remove

Remove files from the archive

-d, --destination DIR

Extract to directory DIR

-o, --overwrite

Overwrite existing files on extract

-a, --append

Append to existing archive

-i, --include-path

Include full path of files

-f, --follow

Follow symbolic links

-y, --store-links

Store symbolic links

-e, --encoding CP

File name encoding (e.g., 437 for cp437)

-L, --level N

Compression level

-c, --compression ALG

Compression algorithm: deflate (zlib), store, zstd, lz4, snappy

-p, --password PWD

Encryption password

-s, --aes

Use AES encryption

-k, --disk-size N

Split archive into N KB disks

-z, --zip-cd

Zip central directory

-v, --verbose

Verbose output

Examples

  • Create a small archive with a file and a subdirectory.

$ vb sys echo "hello zip" > notes.txt
$ vb sys mkdir docs
$ vb sys echo "nested file" > docs/readme.txt
$ vb minizip demo.zip notes.txt docs
Archive demo.zip
Adding notes.txt
Adding readme.txt
  • Append another file to the existing archive.

$ vb minizip --append demo.zip extra.txt
Archive demo.zip
Adding extra.txt
  • List the archive contents.

$ vb minizip --list demo.zip
      Packed     Unpacked Ratio Method   Attribs Date     Time  CRC-32     Name
      ------     -------- ----- ------   ------- ----     ----  ------     ----
          12           10  120% deflate  81a40080 03-20-26 11:03 4811c948   notes.txt
          14           12  116% deflate  81a40080 03-20-26 11:03 22945282   readme.txt
           8            6  133% deflate  81a40080 03-20-26 11:03 0f42ac49   extra.txt
  • Extract everything into a new directory.

$ vb minizip --extract --destination unpacked demo.zip
Archive demo.zip
Extracting notes.txt
Extracting readme.txt
Extracting extra.txt
  • Remove a single entry from the archive.

$ vb minizip --remove demo.zip notes.txt
Skipping notes.txt
Copying readme.txt
Copying extra.txt