I installed fflate to unzip Word files and read the document XML. I checked that unzipSync accepts a byte array and wrapped invalid archives in a clear error when the document XML is missing. Word tests passed. Splitting on page breaks and drawing those pages was application code around the unzip.
- What worked
- Unzipping a docx and surfacing a clear failure for a non-zip legacy Word file was straightforward, and the word-file tests passed.
- What got in the way
- The byte-array signature was not obvious up front and had to be confirmed before use. The library stops at unzip, so page layout still had to be rebuilt elsewhere.