Repository navigation
This release focuses entirely on under-the-hood improvements, drastically reducing cyclomatic complexity across the codebase to ensure Fennec remains highly maintainable, readable, and easy to test.
There are no breaking API changes in this release. All existing integrations and CLI commands will continue to work exactly as before.
🛠 Refactoring & Improvements
- Target Size Engine: Completely modularized the
hitTargetSizesearch engine. Binary scaling, fixed scaling, and fallback encodings are now isolated into focused, highly testable functions. - EXIF Parser: Refactored the minimal, zero-dependency EXIF parser. TIFF orientation parsing and IFD entry scanning are now broken into discrete helper functions.
- SSIM Downsampling: Abstracted the innermost loops of the box filter into a dedicated
averageBoxPixelhelper, improving the readability of the fast-path SSIM calculations. - Core Compression Pipeline: Decoupled
compressImageInternalinto distincthandleTargetSizeModeandhandleStandardModeexecution paths. - CLI: Refactored the monolithic
mainfunction incmd/fennecinto focused handlers for flag parsing, analysis, and compression. - Tests: Moved inline anonymous test fixture generators into standalone, top-level functions in
testdata_generate_test.go.
🧹 Code Quality
- Resolved all
gocyclocomplexity warnings (functions exceeding a complexity score of 15). - Maintained 100% passing test suite and data-race-free execution.
- Verified
go vetandstaticcheckcompliance.
Full Changelog: v1.0.2...v1.0.3