SZDD Commands Reference

Purpose

Complete command-line reference for all SZDD (Single-file LZSS) format operations. This document provides detailed syntax, options, and examples for the 3 SZDD commands.

Concepts

SZDD commands follow MS-DOS compression tool naming: expand for decompression (like EXPAND.EXE) and compress for compression (like COMPRESS.EXE). Commands operate on single files with LZSS compression.

Command Overview

Command Purpose

expand

Expand SZDD compressed file (like MS-DOS EXPAND.EXE)

compress

Compress file to SZDD format (like MS-DOS COMPRESS.EXE)

szdd-info

Show SZDD file information


expand - Expand SZDD File

Decompress SZDD compressed files, compatible with MS-DOS EXPAND.EXE.

Syntax

cabriolet expand [OPTIONS] FILE [OUTPUT]

Parameters

FILE

(required) Path to the SZDD file to expand

OUTPUT

(optional) Output file path (auto-detected from missing character if not specified)

Options

--output, -o

Output file path (alternative to positional argument)

--verbose, -v

Show expansion progress

Returns

  • Exit code 0 on success

  • Exit code 1 on error

  • Exit code 3 if file not found

  • Exit code 4 if permission denied

Description

The expand command decompresses SZDD files, automatically reconstructing the original filename using the missing character stored in the header. This is compatible with files created by MS-DOS COMPRESS.EXE.

Examples

Expand with auto-detected name
cabriolet expand file.tx_
Output
Expanded file.tx_ to file.txt (5,234 bytes)
Expand to specific file
cabriolet expand file.tx_ file.txt
Expand with verbose output
cabriolet expand --verbose file.tx_
Output
Expanding file.tx_ -> file.txt
Format: NORMAL
Uncompressed size: 5,234 bytes
Missing character: 't'

Decompressing...
  Progress: 100%

Expanded file.tx_ to file.txt (5,234 bytes)
Expand using output option
cabriolet expand -o output.txt compressed.tx_
Expand multiple files
for file in *.ex_; do
  cabriolet expand "$file"
done
Expand MS-DOS system files
# Common MS-DOS compressed files
cabriolet expand command.co_    # -> command.com
cabriolet expand himem.sy_      # -> himem.sys
cabriolet expand readme.tx_     # -> readme.txt

Common Errors

  • Invalid SZDD signature: File is not a valid SZDD file

  • Missing character not found: Output filename must be specified explicitly

  • Decompression failed: Compressed data is corrupted

  • Output file exists: Target file already exists (use -f to force, if implemented)

See Also


compress - Compress to SZDD Format

Compress files to SZDD format, compatible with MS-DOS COMPRESS.EXE.

Syntax

cabriolet compress [OPTIONS] FILE [OUTPUT]

Parameters

FILE

(required) Path to the file to compress

OUTPUT

(optional) Output file path (auto-generated with _ suffix if not specified)

Options

--output, -o

Output file path (alternative to positional argument)

--missing-char=CHAR

Missing character for filename reconstruction (auto-detected if not specified)

--format=FORMAT

SZDD format: normal or qbasic (default: normal)

--verbose, -v

Show compression progress

Returns

  • Exit code 0 on success

  • Exit code 1 on error

  • Exit code 3 if source file not found

  • Exit code 4 if permission denied

Description

The compress command creates SZDD compressed files using LZSS compression. Output filename is auto-generated by replacing the last character with underscore (e.g., file.txtfile.tx_), and the missing character is stored in the header for reconstruction.

Examples

Compress with auto-generated name
cabriolet compress file.txt
Output
Compressed file.txt to file.tx_ (2,617 bytes)
Compress to specific file
cabriolet compress file.txt compressed.szdd
Compress with explicit missing character
cabriolet compress --missing-char=t file.txt file.tx_
Compress in QBasic format
cabriolet compress --format=qbasic program.bas program.ba_
Compress with verbose output
cabriolet compress --verbose file.txt
Output
Compressing file.txt -> file.tx_
Format: normal
Missing character: 't'
Uncompressed size: 5,234 bytes

Compressing with LZSS...
  Progress: 100%
  Compressed: 2,617 bytes
  Ratio: 50.0%

Compressed file.txt to file.tx_ (2,617 bytes)
Batch compress files
for file in *.txt; do
  cabriolet compress "$file"
done
Compress with custom naming
cabriolet compress readme.txt readme.doc

Common Errors

  • Source file not found: Verify input file path

  • Cannot create output file: Check write permissions and disk space

  • Compression failed: Input file may be unreadable

See Also


szdd-info - Show SZDD Information

Display detailed information about an SZDD file.

Syntax

cabriolet szdd-info [OPTIONS] FILE

Parameters

FILE

(required) Path to the SZDD file to analyze

Options

--verbose, -v

Show additional technical details

Returns

  • Exit code 0 on success

  • Exit code 1 on error

  • Exit code 3 if file not found

Description

The szdd-info command displays metadata about an SZDD file, including format variant, uncompressed size, missing character, and suggested output filename.

Examples

Basic information
cabriolet szdd-info file.tx_
Output
SZDD File Information
==================================================
Filename: file.tx_
Format: NORMAL
Uncompressed size: 5,234 bytes
Missing character: 't'
Suggested filename: file.txt
QBasic format file
cabriolet szdd-info program.ba_
Output
SZDD File Information
==================================================
Filename: program.ba_
Format: QBASIC
Uncompressed size: 12,345 bytes
Missing character: 's'
Suggested filename: program.bas
Verbose information
cabriolet szdd-info --verbose file.tx_
Output
SZDD File Information
==================================================
Filename: file.tx_
File size: 2,617 bytes

Header:
  Signature: SZDD (0x53 0x5A 0x44 0x44)
  Reserved: 0x88 0xF0 0x27 0x33
  Compression mode: 'A' (0x41)
  Missing character: 't' (0x74)
  Uncompressed length: 5,234 bytes

Format: NORMAL (standard SZDD)
Suggested filename: file.txt

Compression Statistics:
  Compressed size: 2,617 bytes
  Uncompressed size: 5,234 bytes
  Compression ratio: 50.0%
  Space saved: 2,617 bytes (50.0%)
Check multiple files
for file in *.ex_; do
  echo "Checking $file:"
  cabriolet szdd-info "$file"
  echo
done

Common Errors

  • Invalid SZDD signature: File is not a valid SZDD file

  • Unsupported format: Unknown SZDD variant

See Also


Global Options

All SZDD commands support these global options:

--verbose, -v

Enable verbose output with detailed progress

--help, -h

Display command help

--version

Show Cabriolet version

See link: for complete details.

Exit codes

Code Meaning

0

Success

1

General error

2

Invalid arguments

3

File not found

4

Permission denied

5

Corrupt file

6

Unsupported format

Compatibility

MS-DOS EXPAND.EXE

The expand command is compatible with MS-DOS EXPAND.EXE:

  • Reads files created by MS-DOS COMPRESS.EXE

  • Supports standard SZDD format

  • Reconstructs filenames using missing character

  • Handles both normal and QBasic formats

MS-DOS COMPRESS.EXE

The compress command creates files compatible with MS-DOS EXPAND.EXE:

  • Uses LZSS MODE_EXPAND compression

  • Stores missing character in header

  • Creates standard SZDD format files

  • Supports QBasic variant when specified

Common Workflows

Extract MS-DOS Installation Files

# Expand all compressed files in directory
for file in *.ex_ *.dl_ *.sy_; do
  if [ -f "$file" ]; then
    cabriolet expand "$file"
  fi
done

Create Distribution Package

# Compress all files for distribution
for file in *.txt *.exe *.dll; do
  if [ -f "$file" ]; then
    cabriolet compress "$file"
  fi
done

Verify Compressed Files

# Check all SZDD files before extraction
for file in *._; do
  if [ -f "$file" ]; then
    echo "=== $file ==="
    cabriolet szdd-info "$file"
    echo
  fi
done

Batch Conversion

# Expand all SZDD files and organize by type
mkdir -p expanded/exe expanded/dll expanded/txt

for file in *.ex_; do
  cabriolet expand "$file"
  mv "${file%_}" expanded/exe/
done

for file in *.dl_; do
  cabriolet expand "$file"
  mv "${file%_}" expanded/dll/
done

for file in *.tx_; do
  cabriolet expand "$file"
  mv "${file%_}" expanded/txt/
done

Next steps