New features: KFX/AZW8 compression
- Added optional, lossless LZMA compression for KFX/AZW8. Enable it with document.kfx.compression: lzma or --kfx-compression lzma; an explicit CLI flag overrides configuration. Uncompressed output remains the default.
- Compression preserves the original inner CONT bytes and uses unencrypted, independently compressed pages.
- Added adaptive 4/16/32/64-KiB page sizing, targeting approximately 256 compression pages to reduce reader overhead for larger books.
Debugging and reports
- Added the development utility kfxcompress for byte-preserving compression/uncompression of existing KFX files, including a diagnostic uncompressed-envelope mode.
- Enhanced kfxdump to read supported compressed envelopes, report frame/page details with --envelope, and extract the exact inner container with --extract-inner.
- Updated KFXInput validation to automatically unwrap supported compressed files.
- Added .OutputDir to log, panic-log, and report destination templates, allowing artifacts to be placed beside conversion output.
- Standardized per-book report filenames as book.*. Compressed output reports now include envelope diagnostics and the original inner KFX container.
- Expanded documentation covering compression, debug utilities, report contents, validation, and fuzz testing.
Reliability fixes
- Fixed artifact-directory resolution when CLI flags appear after or between positional arguments.
- Added shared atomic output publication for conversion and debug tools, preventing accidental replacement of files created during processing when --overwrite is absent.
- Removed the hard-link requirement for normal publication on Linux, macOS, and Windows.
- Fixed conversion and kfxcompress failures with valid long output filenames, including multibyte names.
- Fixed malformed Ion import crashes in envelope, ordinary KFX, and KPF/KDF readers while preserving legitimate null document values.
- Debug outputs now correctly reject existing dangling symlinks without overwrite permission. Explicit overwrite replaces the destination entry without following the symlink.
- Failed resource ZIP generation now preserves the previous archive.
Testing
- Added regression coverage for compression, malformed inputs, output races, symlinks, long filenames, and cleanup.
- Added manual fuzz testing through go tool task fuzz, covering envelope parsing and Ion/CONT round-trips. Defaults are 15 seconds per target with two workers; budgets are configurable. Seeds replay during normal tests.
Full Changelog: v1.8.3...v1.9.0