Skip to content

v0.5.5

Choose a tag to compare

@GabryDX GabryDX released this 05 Oct 12:07
· 48 commits to main since this release
e73173e

🛡️ MetaJammer v0.5.5 — Release Notes

Summary

MetaJammer v0.5.5 introduces deep PDF hidden annotation and user comment/markup sanitization while preserving clickable navigation links, JPEG JFIF density (DPI) preservation with embedded thumbnail zeroing and JFXX dropping, ultra-low-memory streaming image scrubbers dropping peak heap allocations to 64 KB, streamed PNG metadata inspection skipping raster IDAT chunks, and throttled foreground batch concurrency.


🌟 Key Changes & Improvements

1. PDF Hidden Annotation & Comment / Markup Sanitization

  • Hidden & Invisible Annotation Neutralization: Detects and strips annotations bearing hidden flags (/F 2 Hidden, /F 1 Invisible, /F 32 NoView) as well as Watermarks and Stamps, closing a covert channel where sensitive or steganographic data could be hidden in invisible PDF objects.
  • Interactive Navigation Preservation: Strictly preserves clickable document links (/Link), table-of-contents navigation, and internal cross-references while purging hidden or tracking annotations.
  • User Comments & Markup Purging: Configurably purges reviewer comments and markups (Text, FreeText, Highlight, Underline, Squiggly, StrikeOut, Stamp, Caret, Ink, Popup, FileAttachment, etc.) to remove editor notes, reviewer identities, and attachments.
  • Preview & Diff Inspection: Upgraded PdfMetadataProcessor.readMetadata to surface annotation counts, hidden flags, and author identities in the UI preview and visual diff before processing.
  • Granular Settings: Added dedicated, independent toggle switches in Settings (enabled by default) for stripping PDF hidden annotations and user comments/markups.

2. JPEG JFIF Header DPI Preservation & Thumbnail Sanitization

  • Resolution Density Preservation: Added a configurable setting (enabled by default) to preserve JFIF APP0 headers, retaining physical resolution density (DPI) for photo viewers and print workflows.
  • Embedded Thumbnail Zeroing: When JFIF preservation is active, embedded thumbnail dimensions are zeroed out (xThumbnail = 0, yThumbnail = 0), preventing visual preview data leaks of cropped or edited images.
  • JFXX Extension Thumbnail Stripping: Automatically removes JFXX extension thumbnail markers (APP0 with JFXX\u0000).

3. Streaming Engine Performance & Memory Optimization

  • Streaming JPEG & PNG Scrubbers: Rewrote stripJpegMarkers and stripPngChunks into streaming pipelines streaming directly from InputStream to OutputStream with a fixed 64 KB buffer, eliminating multi-megabyte ByteArray allocations and dropping peak memory consumption from ~150 MB down to 64 KB.
  • Streaming PNG Metadata Reader: Added PngMetadataReader.readMetadata(InputStream) that parses headers and ancillary chunks while seeking over raster IDAT chunks without loading the image raster into memory.
  • Optimized PDF Scanning: Fast pre-check of page.cosObject.containsKey(COSName.ANNOTS) avoids unnecessary annotation array allocations on annotation-free pages, and direct file persistence saves memory.
  • Concurrency Throttling: Foreground multi-file processing is throttled with a concurrency Semaphore (maximum 2 parallel workers) to prevent out-of-memory spikes and thread starvation on low-memory devices.

4. 100% Localization Parity

  • All 24 Supported Locales: Added localized string resources for all 3 new settings across 24 languages: English, Arabic, German, Greek, Spanish, Persian, French, Hebrew, Hindi, Indonesian, Italian, Japanese, Korean, Latin, Dutch, Polish, Portuguese, Romanian, Russian, Thai, Turkish, Ukrainian, Vietnamese, and Chinese (241 strings per locale).

5. Automated Test Suite

  • 139 Passing Unit Tests: Expanded test suite with comprehensive coverage for PDF hidden annotation removal on real-world files (PagedOut_008.pdf), comment filtering, JFIF thumbnail zeroing and JFXX dropping, and streaming-vs-bytearray parity tests.

📦 Build Artifacts

  • Package: com.heronikostudios.metajammer
  • Version: 0.5.5 (Code 10)
  • Target SDK: 37 (Android 16) | Min SDK: 26 (Android 8.0)