Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How decompress/compress a docx-file successfully without warning of corruption? #26

Open
sm-a opened this issue Mar 19, 2019 · 1 comment

Comments

@sm-a
Copy link

sm-a commented Mar 19, 2019

I want to extract a docx file (zipfile = docx-file) and compress it with modifications new. But when I opened the new compressed docx file without change (only decompress and then compress) then I get a corruption warning.

What I must do to decompress/compress with quazip a docx file successfully without warning of corruption?

Here my methods:

void smaZip(QString zipfile , QString zipdir)
{
if(JlCompress::compressDir(zipfile, zipdir))
{
qDebug() << "compressing success!" << endl;
} else {
qDebug() << "compressing not successful!" << endl;
}

}

void smaUnZip(QString zipfile , QString zipdir)
{
QStringList list = JlCompress::extractDir(zipfile, zipdir);

foreach(QString item, list)
{
    qDebug() << "extracted file: " << item << endl;
}

}

Very thank you for your help.

Greetings,
Sven

@stachenov
Copy link
Owner

It's hard to say anything without any details. Why exactly is it considered corrupted? Maybe checking the archive with some 3rd party software will yield some kind of a detailed error message, assuming something wrong with it in the first place. That's one idea. Another is that maybe Office has some requirements about ZIP versions or allowed features? QuaZIP uses rather old ZIP format version, with little advanced features, so I'd rather assume that something is missing than something unwanted is there.

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

No branches or pull requests

2 participants