Keka icon indicating copy to clipboard operation
Keka copied to clipboard

[REQ]DOCX deflation

Open sirfragalot opened this issue 9 months ago • 6 comments

Is your feature request related to a problem? Please describe

I'm doing a PHP HTML —> DOCX convertor and it would be useful to be able to compress the DOCX folder to a .docx file that opens in Word, LO, etc. for testing purposes. (Uncompressing a .docx file to a DOCX folder with Keka works perfectly fine.)

Describe the solution you'd like

DOCX uses the DEFLATE compression algorithm. I know little about compression, but I have tried every single compression option within Keka without success. Unless I have missed something, it would therefore be great to have a DEFLATE compression in Keka suitable for creating .docx files.

Describe alternatives you've considered

I could use PHP's \ZipArchive::CM_DEFLATE to accomplish this, but it would be a lot easier to just drag the folder to Keka.

Additional context

Other than that, a beautiful piece of work is Keka. Thank you.

sirfragalot avatar Mar 24 '25 08:03 sirfragalot

Hi @sirfragalot,

You can recreate the docx using Keka and the zip format. Just be sure to compress the structure (_rels, word...) and not the containing folder.

You can also use the "Compress the contents of the folder" option in the Finder Extension with the parent folder:

Image

Just be sure to rename the zip extension to docx once compressed.

aonez avatar Mar 24 '25 11:03 aonez

What a quick response aonez—thank you. I must be doing something wrong because both LO and Word report a corrupted file when I try to open. If I unzip the compressed file, the structure is as I expect—so that part at least seems fine.

sirfragalot avatar Mar 24 '25 11:03 sirfragalot

Now I've tried actually opening with Word (I don't usually use it) and I'm seeing the issue you mention.

aonez avatar Mar 24 '25 11:03 aonez

Same thing with LO (LibreOffice).

sirfragalot avatar Mar 24 '25 11:03 sirfragalot

I've used TextEdit and Pages without issue, that's why I did thought about file structure.

Seems like Word (and LO probably) expect the older deflate method and does not accept deflate64.

aonez avatar Mar 28 '25 16:03 aonez

You're having more luck than me. TextEdit and Pages won't open the file for me.

sirfragalot avatar Mar 28 '25 23:03 sirfragalot