zip/unzip in Caché

466 views
Skip to first unread message

Alexander Neuber

unread,
May 10, 2006, 1:14:08 PM5/10/06
to intersystems...@info2.kinich.com
Hi,

I know it is a old question, but maybe there are any news

I want to read a zip-file as Stream from the filesystem, unzip it and
manipulate the contents in Caché. Then I want to zip it and save it back to
the filesystem.

In the zipfile there are files and folders

Maybe anyone has an idea how I can solve this problem.


Thanks
Alexander

Alexander Riemer

unread,
May 10, 2006, 4:01:09 PM5/10/06
to intersystems...@info2.kinich.com
How about to call call an unzipper and manipulate the unzipped files? You
can handle them as streams also.


"Alexander Neuber" <alexande...@leichum.com> schrieb im Newsbeitrag
news:44621...@info2.kinich.com...

Rob Tweed

unread,
May 11, 2006, 2:21:23 AM5/11/06
to intersystems...@info2.kinich.com
I don't think there's any advance on invoking something like
pkzip/pkunzip from within Cache using $zf calls. It actually works
very well. Handling multiple files in folders will be a bit messy
but ought to be possible to handle using the relevant $zu functions

---
Rob Tweed
M/Gateway Developments Ltd

The Pursuit of Productivity : http://www.mgateway.com
---

Alexander Neuber

unread,
May 11, 2006, 3:29:11 AM5/11/06
to intersystems...@info2.kinich.com
Hi,

There is a little bit more, what i want to do:

We use the XML-format to create MS-Office Documents and to mail them. I don't
write a file to the filesystem.

In the next Office Version, there will be a new fileformat
(www.ecma-international.org/memento/TC45.htm) an I want to do the same in
the new format.

brgs
Alexander


"Alexander Neuber" <alexande...@leichum.com> schrieb im Newsbeitrag
news:44621...@info2.kinich.com...

Alexander Riemer

unread,
May 11, 2006, 2:22:38 PM5/11/06
to intersystems...@info2.kinich.com
Hi,

how does this apply to zip/unzip of archives with many files and
directories?

Regards
Alex

"Alexander Neuber" <alexande...@leichum.com> schrieb im Newsbeitrag

news:4462e...@info2.kinich.com...

Alexander Neuber

unread,
May 12, 2006, 4:39:43 AM5/12/06
to intersystems...@info2.kinich.com
Hi,

sorry Alexander, I am not to good in english and have trubles to understand
your question.

can you please repeat it in other words.


Thank you
Alexander


"Alexander Riemer" <_alex....@gmx.net> schrieb im Newsbeitrag
news:44638...@info2.kinich.com...

Alexander Riemer

unread,
May 12, 2006, 1:28:04 PM5/12/06
to intersystems...@info2.kinich.com
Hallo Alexander,

dann eben auf Deutsch :-)
Vielleicht habe ich meine Frage auf Englisch auch nicht ganz richtig
formuliert ;-)

Die Frage war: Was hat das Erstellen von MS-Office-Dokumenten mit
Zipen/Unzipen zu tun? OK, Du schreibst, dass Du das Office-Dokument mailst.
Möchtest Du es vor dem Mailen zipen? Falls ja, solltest Du die Datei nicht
als (Global-) Stream erstellen sondern als eine Datei. Danach kannst Du ein
Komprimierungsprogramm aufrufen und die komprimierte Datei mailen. Einen
Caché-nativen Komprimierer kenne ich leider nicht.

Habe ich das Problem nun richtig verstanden?

Gruss
Alex

"Alexander Neuber" <alexande...@leichum.com> schrieb im Newsbeitrag

news:44644...@info2.kinich.com...

Alexander Neuber

unread,
May 15, 2006, 2:51:28 PM5/15/06
to intersystems...@info2.kinich.com
Hallo Alexander,

Danke für die Vereinfachung der Kommunikation.

Microsoft hat sich für die neue Office-Version das Fileformat geändert bzw.
sich an einen (neuen) Standard angepasst.

Ein Dokument besteht aus verschiedenen Bestandteilen:
) Texte
) Formatierungen
) Graphiken
) Benutzerinformationen
jeder dieser Bestandteile wir in einem Verzeichnis als XML-Datei abgelegt.

Danach wird alles in einen Zip-Container gepackt.

Daher meine Idee, wenn ich aber genauer darüber nachdenke, werde ich ein
Temporäres Dokumentenabhängiges-Verzeichnis legen und darin alle Operationen
die für das erstellen und manipulieren des Dokumentes notwendigen sind
durchführen.

Wird ein interresantes Projekt werden.

Danke für die Denkhilfe

Jetzt ist nur noch zu klären was das beste Progamm zum Un/Zippen ist.

Schöne Grüße
Alexander


"Alexander Riemer" <_alex....@gmx.net> schrieb im Newsbeitrag

news:4464c...@info2.kinich.com...

Alexander Riemer

unread,
May 15, 2006, 3:59:40 PM5/15/06
to intersystems...@info2.kinich.com
Hallo Alexander,

> Wird ein interresantes Projekt werden.

Kannst Du vielleicht die Früchte Deiner Arbeit mit der Caché-Gemeinde
teilen? Es gibt unter zcachelib.org eine Plattform, die sich der (offenen)
Entwicklung von Caché-Tools verschriehen hat. Evlt. kannst Du dort ein
Projekt starten. Von dieser Arbeit können viele profitieren und Du könntest
von der Zuarbeit (z. B. Testen, Dokumentieren, Weiterentwickeln) der anderen
profitieren.

Das Projekt könnte evtl. später auf das neue ISO-standardisierte OpenOffice
Dokumentenformat erweitert werden.

> Jetzt ist nur noch zu klären was das beste Progamm zum Un/Zippen ist.

Da gibt es haufenweise Tools. Ich selbst nutze 7-zip (www.7-zip.org). Es
steht unter der LGPL-Lizenz und kann somit auch in kommerziellen Projekten
genutzt werden. Alternativ kann man auch tar/gzip nutzen. Ich schätze aber,
MS-Office kann damit nicht umgehen :-)

Gruss
Alex

Derek Day

unread,
May 15, 2006, 7:28:38 PM5/15/06
to intersystems...@info2.kinich.com
When you have arrived at the answer or would like any additional
comments could you (or a watcher) please translate the relevant parts
for the rest of us :).

--
Thanks,
Derek Day
Intersystems Support Adviser

Alexander Riemer

unread,
May 17, 2006, 4:15:21 PM5/17/06
to intersystems...@info2.kinich.com
Translation from German:

How does the creation of MS Office documents concern with zip/unzip files?
OK, you say, you want to mail your Office documents. Do you want to zip them
first? If so, you should create them as normal files instead of (global)
streams. Afterwards you can call an archiver und email the archive. I don't
know a Caché native archiver.

Did I get your problem right?

Regards
Alex

Alexander Riemer

unread,
May 17, 2006, 4:26:50 PM5/17/06
to intersystems...@info2.kinich.com
Translation from German:

Thanks for simplifying the communication.

Microsoft has changed their file format for Office documents.

A document consists of
) Text
) Formatting information
) Graphics
) User information
Each of this part has to be created as a XML file and placed in the same
directory.

Then all this elements are compressed to a zip file.

And that was my first idea: To create all relevant XML files in the Caché DB
and then compress it the database.
But if I think about it, I will create a temporary directory for each
document and create all necessary files there.

It will be an interesting project.

Now I have to find out what's the best program for zipping/unzipping.

Regards

"Alexander Neuber" <alexande...@leichum.com> schrieb im Newsbeitrag

news:4468c...@info2.kinich.com...

Rob Tweed

unread,
May 17, 2006, 4:30:40 PM5/17/06
to intersystems...@info2.kinich.com
I'd recommend you look at using eXtc, so you can use Cache as a Native
XML Database to hold and manipulate the Word XML document(s)

www.mgateway.com/extc.htm

Rob

---

Alexander Riemer

unread,
May 17, 2006, 4:43:01 PM5/17/06
to intersystems...@info2.kinich.com
Translation from German:

> It will be an interesting project.

Could you please share your work with the Caché community? There is a
platform on www.zcachelib.org which hosts community developed Caché tools.
Maybe you can start a project there. There are a lot of people that could
profit from your work and you could get more workers for your project (for
testing, documenting and development).

You could also expand your project for creating the brand new ISO
standardized OpenOffice document format (ODF).

> Now I have to find out what's the best program for zipping/unzipping.

There are a lot of tools. I use 7-zip myself (www.7-zip.org). It is licensed
under LGPL and therefore you can use it commercial projects also. You could
use tar/gzip as an alternative. But I guess MS Office can't handle this :-)

Regards
Alex

"Alexander Riemer" <_alex....@gmx.net> schrieb im Newsbeitrag

news:4468d...@info2.kinich.com...

Chris Casey

unread,
May 24, 2006, 4:41:36 AM5/24/06
to intersystems...@info2.kinich.com
Alexander,

in a previous incarnation I got hold of a cheap zip/unzip utility off the
web and used the Cache activex functionality built a little wrapper class to
rpovide this funcionality. This worked very well

Chris

"Alexander Neuber" <alexande...@leichum.com> wrote in message
news:44621...@info2.kinich.com...

Alexander Riemer

unread,
May 24, 2006, 12:03:22 PM5/24/06
to intersystems...@info2.kinich.com
> in a previous incarnation I got hold of a cheap zip/unzip utility off the
> web and used the Cache activex functionality built a little wrapper class
> to
> rpovide this funcionality. This worked very well

And what's the name of it?

Chris Casey

unread,
May 25, 2006, 5:17:26 AM5/25/06
to intersystems...@info2.kinich.com
It was called Dynazip from innermedia.com.
This was a couple of years ago so don't know if it is still the best on the
market. I found it very reliable and easy to use though.


"Alexander Riemer" <_alex....@gmx.net> wrote in message
news:44748...@info2.kinich.com...

Reply all
Reply to author
Forward
0 new messages