How the Word Compressor Works
AnyTool Compress Word shrinks a .docx entirely in the browser. A .docx is an Office Open XML package — a ZIP whose word/media folder holds the embedded images — so the tool unzips it with JSZip, decodes each raster picture (PNG, JPEG, BMP, TIFF) onto an HTML canvas, and re-encodes it as a JPEG at the chosen quality. A re-encoded image is only written back when it is genuinely smaller than the original, after which the package is rebuilt with DEFLATE compression into a valid .docx.
- .docx is a ZIP of Office Open XML parts plus media files
- Embedded raster images are decoded on a canvas and re-encoded to JPEG
- A re-encoded image is kept only when it is smaller than the original
- Relationship (.rels) and [Content_Types].xml entries are rewritten when an extension changes
- All unzipping, re-encoding and repacking is client-side JavaScript
