GDAL-VSI-SOZIP(1)

πŸ‘‘ gdal-vsi-sozip β€” the GDAL manual, bestie edition πŸ’…

okay so this is gdal-vsi-sozip, part of the GDAL family of manual pages, and it's the one that handles all your SOZIP (Seek-Optimized ZIP) business. no cap, it's a glow-up for your zip files. ✨


🌸 NAME 🌸

gdal-vsi-sozip β€” SOZIP (Seek-Optimized ZIP) related commands.

Added in version 3.11. πŸ†•


πŸ’– DESCRIPTION πŸ’–

The gdal vsi 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 into a SOZip optimized one

like... five whole jobs?? she does it all, main character energy fr fr. πŸ‘‘


✨ SYNOPSIS ✨

Usage: gdal vsi sozip <SUBCOMMAND> [OPTIONS]
where <SUBCOMMAND> is one of:
  - create:   Create Seek-optimized ZIP (SOZIP) file.
  - list:     List content of a ZIP file, with SOZIP related information.
  - optimize: Create a Seek-optimized ZIP (SOZIP) file from a regular ZIP file.
  - validate: Validate a ZIP file, possibly using SOZIP optimization.

Common Options:
  -h, --help              Display help message and exit
  --json-usage            Display usage as JSON document and exit
  --config <KEY>=<VALUE>  Configuration option [may be repeated]

The shared Common Options, so you don't have to scroll back and forth (you're welcome 🫢):

  • -h, --help β€” show the help message and bounce. iconic behavior.
  • --json-usage β€” print the usage as a JSON document and exit. for the machine girlies πŸ€–
  • --config <KEY>=<VALUE> β€” set a configuration option. it may be repeated (go off, stack them πŸ’…).

πŸ¦‹ GDAL VSI SOZIP CREATE πŸ¦‹

πŸ’œ Description

Adds one or several files to a new or existing zip file.

πŸŽ€ Synopsis

Usage: gdal vsi sozip create [OPTIONS] <INPUT> <OUTPUT>

Create a Seek-optimized ZIP (SOZIP) file.

Positional arguments:
  -i, --input <INPUT>                                          Input filenames [may be repeated] [required]
  -o, --output <OUTPUT>                                        Output ZIP filename [required]

Common Options:
  -h, --help                                                   Display help message and exit
  --json-usage                                                 Display usage as JSON document and exit
  --config <KEY>=<VALUE>                                       Configuration option [may be repeated]
  -q, --quiet                                                  Quiet mode (no progress bar or warning message) [not available in pipelines]

Options:
  --overwrite                                                  Whether overwriting existing output dataset is allowed
  -r, --recursive                                              Travels the directory structure of the specified directories recursively
  -j, --junk-paths, --no-paths                                 Store just the name of a saved file, and do not store directory names
  --enable-sozip <ENABLE-SOZIP>                                Whether to automatically/systematically/never apply the SOZIP optimization. ENABLE-SOZIP=auto|yes|no (default: auto)
  --sozip-chunk-size <value in bytes or with K/M suffix>       Chunk size for a seek-optimized file (default: 32768)
  --sozip-min-file-size <value in bytes or with K/M/G suffix>  Minimum file size to decide if a file should be seek-optimized (default: 1 MB)
  --content-type <CONTENT-TYPE>                                Store the Content-Type of the file being added.

🌈 Options

  • -i, --input <INPUT> β€” the input filenames. Required. several file names or directory names are accepted, so bring a whole crew.
  • -o, --output <OUTPUT> β€” the output ZIP filename. Required. it must have a .zip extension, no exceptions bestie 😀
  • --overwrite β€” whether overwriting existing output is allowed. (default: no ruining your old files without permission 🚫)
  • -r, --recursive β€” travels the directory structure of the specified directories recursively. she goes deep. πŸ•³οΈ
  • -j, --junk-paths, --no-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).
  • --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. (default: auto, our little negotiator πŸ’…)
  • --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 (optionally preceded by a space) 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 (optionally preceded by a space) 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 girlies rise πŸ™ˆ
  • -q, --quiet β€” do not output any informative message (only errors). shhh. 🀫

⭐ 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. literally working all her cores, we stan a try-hard πŸ”₯

πŸ“ Examples

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

gdal vsi sozip create my.gpkg my.gpkg.zip

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

gdal vsi sozip create -r source_dir/ my.gpkg.zip

🧚 GDAL VSI SOZIP OPTIMIZE 🧚

πŸ’œ Description

Create a new zip file from the content of an existing one, possibly applying SOZip optimization when relevant.

πŸŽ€ Synopsis

Usage: gdal vsi sozip optimize [OPTIONS] <INPUT> <OUTPUT>

Create a Seek-optimized ZIP (SOZIP) file from a regular ZIP file.

Positional arguments:
  -i, --input <INPUT>                                          Input ZIP filename [required]
  -o, --output <OUTPUT>                                        Output ZIP filename [required]

Common Options:
  -h, --help                                                   Display help message and exit
  --json-usage                                                 Display usage as JSON document and exit
  --config <KEY>=<VALUE>                                       Configuration option [may be repeated]
  -q, --quiet                                                  Quiet mode (no progress bar or warning message) [not available in pipelines]

Options:
  --overwrite                                                  Whether overwriting existing output dataset is allowed
  --enable-sozip <ENABLE-SOZIP>                                Whether to automatically/systematically/never apply the SOZIP optimization. ENABLE-SOZIP=auto|yes|no (default: auto)
  --sozip-chunk-size <value in bytes or with K/M suffix>       Chunk size for a seek-optimized file (default: 32768)
  --sozip-min-file-size <value in bytes or with K/M/G suffix>  Minimum file size to decide if a file should be seek-optimized (default: 1 MB)

🌈 Options

  • -i, --input <INPUT> β€” Input ZIP filename. Required.
  • -o, --output <OUTPUT> β€” Output ZIP filename. Required. Must have a .zip extension ⚠️
  • --overwrite β€” Whether overwriting existing output is allowed.
  • --enable-sozip auto|yes|no β€” in auto mode, a file is seek-optimized only if its size is above the value of --sozip-chunk-size. in yes mode, all input files will be seek-optimized. in no mode, no input files will be seek-optimized. (default: auto)
  • --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.
  • -q, --quiet β€” Do not output any informative message (only errors).

⭐ 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. yes she threads, she's that girl 🌈

πŸ“ Examples

Example 3: Create a, potentially seek-optimized, ZIP file sozip_optimized.zip from an existing ZIP file in.zip.

gdal vsi sozip optimize in.zip sozip_optimized.zip

🫢 GDAL VSI SOZIP LIST 🫢

πŸ’œ Description

List the files contained in the zip file in an output similar to Info-ZIP unzip utility, but with the addition of a column indicating whether each file is seek-optimized.

πŸŽ€ Synopsis

Usage: gdal vsi sozip list [OPTIONS] <INPUT>

List content of a ZIP file, with SOZIP related information.

Positional arguments:
  -i, --input <INPUT>     Input ZIP filename [required]

Common Options:
  -h, --help              Display help message and exit
  --json-usage            Display usage as JSON document and exit
  --config <KEY>=<VALUE>  Configuration option [may be repeated]

🌈 Options

  • -i, --input <INPUT> β€” Input ZIP filename. Required.

πŸ“ Examples

Example 4: List contents of my.zip.

gdal vsi sozip list my.zip

πŸ’€ GDAL VSI SOZIP VALIDATE πŸ’€

πŸ’œ Description

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 the normal stuff gets a casual vibe check and the SOZip stuff gets the full interrogation πŸ”

πŸŽ€ Synopsis

ngl bestie, the page literally prints the list usage here β€” that's exactly what it says, so here it is, unchanged:
Usage: gdal vsi sozip list [OPTIONS] <INPUT>

List content of a ZIP file, with SOZIP related information.

Positional arguments:
  -i, --input <INPUT>     Input ZIP filename [required]

Common Options:
  -h, --help              Display help message and exit
  --json-usage            Display usage as JSON document and exit
  --config <KEY>=<VALUE>  Configuration option [may be repeated]

🌈 Options

  • -i, --input <INPUT> β€” Input ZIP filename. Required.
  • -q, --quiet β€” Do not output any informative message (only errors).
  • -v, --verbose β€” Turn on verbose mode. tell me everything, I'm listening πŸ‘‚

πŸ’– 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 a lil warning is not a fail, don't spiral πŸ’…

πŸ“ Examples

Example 5: Validate my.zip.

gdal vsi sozip validate my.zip

🌟 AUTHOR 🌟

Even Rouault <even.rouault@spatialys.com> β€” legend behavior, honestly πŸ‘‘


1998-2026


and that's the whole page, bestie!! you ate that 🍽️✨ this one's straight from the GDAL manual (that's the source, fr fr) and it's dated Aug 18, 2026 β€” so go forth, seek-optimize your zips, and remember: the vibe changes, the facts do not. periodt. πŸ’–πŸŒΈπŸ¦‹

πŸ“¦ where this page comes from