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 SZDD compressed file (like MS-DOS EXPAND.EXE) | |
Compress file to SZDD format (like MS-DOS COMPRESS.EXE) | |
Show SZDD file information |
expand - Expand SZDD File
Decompress SZDD compressed files, compatible with MS-DOS EXPAND.EXE.
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
cabriolet expand file.tx_Expanded file.tx_ to file.txt (5,234 bytes)cabriolet expand file.tx_ file.txtcabriolet expand --verbose file.tx_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)cabriolet expand -o output.txt compressed.tx_for file in *.ex_; do
cabriolet expand "$file"
done# Common MS-DOS compressed files
cabriolet expand command.co_ # -> command.com
cabriolet expand himem.sy_ # -> himem.sys
cabriolet expand readme.tx_ # -> readme.txtCommon 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)
compress - Compress to SZDD Format
Compress files to SZDD format, compatible with MS-DOS COMPRESS.EXE.
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:
normalorqbasic(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.txt → file.tx_), and the missing character is stored in the header for reconstruction.
Examples
cabriolet compress file.txtCompressed file.txt to file.tx_ (2,617 bytes)cabriolet compress file.txt compressed.szddcabriolet compress --missing-char=t file.txt file.tx_cabriolet compress --format=qbasic program.bas program.ba_cabriolet compress --verbose file.txtCompressing 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)for file in *.txt; do
cabriolet compress "$file"
donecabriolet compress readme.txt readme.docCommon 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
szdd-info - Show SZDD Information
Display detailed information about an SZDD file.
Description
The szdd-info command displays metadata about an SZDD file, including format variant, uncompressed size, missing character, and suggested output filename.
Examples
cabriolet szdd-info file.tx_SZDD File Information
==================================================
Filename: file.tx_
Format: NORMAL
Uncompressed size: 5,234 bytes
Missing character: 't'
Suggested filename: file.txtcabriolet szdd-info program.ba_SZDD File Information
==================================================
Filename: program.ba_
Format: QBASIC
Uncompressed size: 12,345 bytes
Missing character: 's'
Suggested filename: program.bascabriolet szdd-info --verbose file.tx_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%)for file in *.ex_; do
echo "Checking $file:"
cabriolet szdd-info "$file"
echo
doneGlobal 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
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
doneCreate Distribution Package
# Compress all files for distribution
for file in *.txt *.exe *.dll; do
if [ -f "$file" ]; then
cabriolet compress "$file"
fi
doneVerify Compressed Files
# Check all SZDD files before extraction
for file in *._; do
if [ -f "$file" ]; then
echo "=== $file ==="
cabriolet szdd-info "$file"
echo
fi
doneBatch 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/
doneNext steps
-
Review Basic Usage Guide for usage examples
-
Study Ruby API Reference for Ruby integration
-
Learn about LZSS compression