SOZIP(1)

✨ SOZIP(1) ✨

okay bestie, pull up a chair, because sozip is literally that girl πŸ’… this is the GDAL manual page for sozip, and by the end you're gonna be making seek-optimized zip files like it's nothing. no cap. πŸ¦‹

🌟 Added in version 3.7. (fresh out the box, iconic behavior)

πŸŽ€ SYNOPSIS πŸŽ€

sozip [--help] [--help-general]
      [--quiet|--verbose]
      [[-g|--grow] | [--overwrite]]
      [-r|--recurse-paths]
      [-j|--junk-paths]
      [-l|--list]
      [--optimize-from=<input.zip>]
      [--validate]
      [--enable-sozip={auto|yes|no}]
      [--sozip-chunk-size=<value>]
      [--sozip-min-file-size=<value>]
      [--content-type=<value>]
      <zip_filename> [<filename>]...

πŸ’– DESCRIPTION πŸ’–

so, what is sozip actually for? she does a LOT, and she does it well. the sozip utility can be used to:

  • create a SOZip (Seek-Optimized ZIP) file πŸ”₯
  • append files to an existing ZIP/SOZip file
  • list the contents of a ZIP/SOZip file
  • validate a SOZip file
  • convert an existing Zip file in a SOZip optimized one
TIP: πŸ’‘ Equivalent in new "gdal" command line interface: See gdal vsi sozip.

and now, the options. every single one, bestie, because we don't skip. 😀

  • --help β€” shows this help message and peaces out. ✌️
  • --help-general β€” gives you a brief usage message for the generic GDAL commandline options, then exits.
  • --quiet β€” quiet mode, bestie. no progress message is emitted on the standard output. shhh. 🀫
  • --verbose β€” verbose mode. she's telling you EVERYTHING.
  • -g, --grow β€” grow an existing zip file with the content of the specified filename(s). This is the default mode of the utility. This switch is here for compatibility with the Info-ZIP zip utility. (yes she keeps the old friends around, we love a legacy-supporting queen πŸ‘‘)
  • --overwrite β€” overwrite the target zip file if it already exists. out with the old πŸ’€
  • -l, --list β€” list the files contained in the zip file in an output similar to the Info-ZIP unzip utility, but with the addition of a column indicating whether each file is seek-optimized. the receipts!! 🧾
  • --validate β€” validates a SOZip file. Baseline ZIP validation is done in a light way, limited to being able to browse through ZIP records with the InfoZIP-based ZIP reader used by GDAL. But validation of the SOZip-specific aspects is done more thoroughly. so like, casual glance for the basics, full FBI investigation for the SOZip parts. πŸ”
  • -r, --recurse-paths β€” travels the directory structure of the specified directory/directories recursively. she goes deep. πŸ•³οΈ
  • -j, --junk-paths β€” store just the name of a saved file (junk the path), and do not store directory names. By default, sozip will store the full path (relative to the current directory). throw that path away, we don't need it ✨
  • --optimize-from=<input.zip> β€” re-process {input.zip} to generate a SOZip-optimized .zip. Options --enable-sozip, --sozip-chunk-size and --sozip-min-file-size may be used in that mode.
  • --enable-sozip={auto|yes|no} β€” In auto mode, a file is seek-optimized only if its size is above the value of --sozip-min-file-size. In yes mode, all input files will be seek-optimized. In no mode, no input files will be seek-optimized. pick your fighter πŸ₯Š
  • --sozip-chunk-size=<value> β€” Chunk size for a seek-optimized file. Defaults to 32768 bytes. The value is specified in bytes, or K and M suffix can be respectively used to specify a value in kilo-bytes or mega-bytes.
  • --sozip-min-file-size=<value> β€” Minimum file size to decide if a file should be seek-optimized, in --enable-sozip=auto mode. Defaults to 1 MB byte. The value is specified in bytes, or K, M or G suffix can be respectively used to specify a value in kilo-bytes, mega-bytes or giga-bytes.
  • --content-type=<value> β€” Store the Content-Type for the file being added as a key-value pair in the extra field extension 'KV' (0x564b) dedicated to storing key-value pair metadata. metadata stans rise up πŸ“š
  • <zip_filename> β€” Filename of the zip file to create/append to/list.
  • <filename> β€” Filename of the file to add.

🧡 MULTITHREADING 🧡

The GDAL_NUM_THREADS configuration option can be set to ALL_CPUS or a integer value to specify the number of threads to use for SOZip-compressed files. Defaults to ALL_CPUS. she's bringing the whole group chat, not just one girl πŸ’…


🌈 RETURN STATUS CODE 🌈

The program returns status code 0 in case of success, and non-zero in case of error (non-blocking errors emitted as warnings are considered as a successful execution). so 0 = slay, non-zero = we have a situation 😭


πŸ¦‹ C API πŸ¦‹

Functionality of this utility can be done from C with CPLAddFileInZip() or VSICopyFile().


✨ EXAMPLES ✨

Create a, potentially seek-optimized, ZIP file with the content of my.gpkg:

sozip my.gpkg.zip my.gpkg

Create a, potentially seek-optimized, ZIP file from the content of a source directory:

sozip -r my.gpkg.zip source_dir/

Create a, potentially seek-optimized, ZIP file from an existing ZIP file.

sozip --convert-from=in.zip out.zip

List the contents of a ZIP file and display which files are seek-optimized:

sozip -l my.gpkg.zip

Validates a SOZip file:

sozip --validate my.gpkg.zip

🫢 AUTHOR 🫢

Even Rouault <even.rouault@spatialys.com>


1998-2026


and that's the whole page, bestie!! πŸŽ€ this was SOZIP(1) from the GDAL manual, dated Aug 18, 2026 β€” go forth and seek-optimize, you absolute icon. periodt. πŸ’–βœ¨πŸŒΈ

πŸ“¦ where this page comes from