Skip to content

✨[Feat] Sprint 5 WebP Container Parser and Cleaner - #6

Merged
maruson08 merged 4 commits into
mainfrom
feat/sprint-5-webp-container-cleaner
Aug 25, 2026
Merged

✨[Feat] Sprint 5 WebP Container Parser and Cleaner#6
maruson08 merged 4 commits into
mainfrom
feat/sprint-5-webp-container-cleaner

Conversation

@maruson08

Copy link
Copy Markdown
Member

Summary

  • adds bounded RIFF/WebP parsing with declared-container boundaries, chunk padding, maxChunks, and conservative trailing-data handling
  • distinguishes VP8, VP8L, VP8X, ALPH, ANIM, ANMF, EXIF, XMP, ICCP, and unknown chunks without decoding payloads
  • integrates WebP EXIF/XMP/ICCP container inspection
  • adds deterministic WebP Privacy Clean with one output allocation
  • removes complete EXIF/XMP chunks and their padding while preserving ICCP, image/animation chunks, unknown chunks, order, retained padding, and trailing bytes
  • repairs little-endian RIFF size and only the ICC/EXIF/XMP VP8X feature bits
  • adds WebP verification for observable EXIF/XMP/ICC presence
  • rejects unsafe RIFF/chunk boundaries and invalid/duplicate VP8X before output
  • keeps WebP EXIF at container-level detection because Sprint 5 does not guess a TIFF prefix or offset base

Test efficiency

  • one small WebP builder
  • one canonical cleaner fixture covers multiple metadata chunks, odd padding, VP8X repair, RIFF repair, animation/image preservation, trailing bytes, determinism, idempotency, input preservation, and verification
  • table-driven malformed parser and cleaner cases
  • removes two obsolete WebP unsupported/format-only placeholders
  • 19 test files, 185 tests, 983 ms

Validation

  • format: pass
  • lint: pass
  • typecheck: pass
  • tests: pass
  • build: pass
  • package dry run: 41,801 bytes packed / 198,994 bytes unpacked
  • npm audit: 0 vulnerabilities
  • runtime dependencies: 0
  • development dependencies: 8

PNG remains format detection only. JPEG behavior and tests remain unchanged.

@maruson08
maruson08 merged commit f3c1f93 into main Aug 25, 2026
1 check passed
@maruson08
maruson08 deleted the feat/sprint-5-webp-container-cleaner branch August 25, 2026 05:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant