tool-zx7

Compresses files with the ZX7 optimal LZ77/LZSS algorithm for z80 targets.

1.1k|206|Updated Mar 16, 2016
One-click install
npx skills add https://github.com/z88dk/z88dk --skill tool-zx7-z88dk
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tool-zx7
Source: https://github.com/z88dk/z88dk/tree/main/.agents/skills/tool-zx7
Command: npx skills add https://github.com/z88dk/z88dk --skill tool-zx7-z88dk

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Shrinking binary assets and data for memory-constrained z80 and 8080 machines requires a compact, well-supported compressor, and manually invoking the z88dk ZX7 tool with correct flags is error-prone without a reference. ## Core Features & Use Cases - ZX7 Compression: Runs the host-side z88dk-zx7 compressor implementing Einar Saukas' optimal LZ77/LZSS algorithm. - Backwards Compression: Supports the -b flag to compress backwards and -f to force overwriting existing output files. - Use Case: When building a ZX Spectrum game with z88dk, compress level data or graphics with z88dk-zx7 input.bin output.zx7, then decompress on-device using the matching dzx7 library routines. ## Quick Start Compress the file assets.bin with ZX7 by running z88dk-zx7 assets.bin assets.zx7, forcing overwrite if the output already exists.

Frequently Asked Questions about tool-zx7

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I compress a file with ZX7 in z88dk?

Run z88dk-zx7 with the input file and an optional output name, for example z88dk-zx7 input.bin output.zx7. Add -f to force overwriting an existing output file.

What is the difference between z88dk-zx7 and z88dk-dzx7?

z88dk-zx7 is the host-side compressor that packs data with the ZX7 algorithm, while dzx7 refers to the decompressor routines that run on the z80 target inside the z88dk libraries.

What does the -b flag do in z88dk-zx7?

The -b flag compresses the input backwards, producing a stream suited to decompressors that work from the end of the data toward the start. Use it only when your on-target decompressor variant expects backwards-compressed data.

Can ZX7 compressed data be decompressed on a ZX Spectrum?

Yes, the z88dk z80 libraries ship companion dzx7 decompressor routines designed to run on z80 machines like the ZX Spectrum. Compress on the host with z88dk-zx7 and link the matching decompressor in your project.

Why does z88dk-zx7 refuse to overwrite my output file?

By default the tool will not overwrite an existing output file. Pass the -f flag to force overwriting, or delete the existing output before running the compressor again.