[Lazarus] Zipfiles using Paszlib...

Hans-Peter Diettrich DrDiettrich1 at aol.com
Tue Feb 10 11:39:59 CET 2009


Graeme Geldenhuys schrieb:

> Later in the year I want to extend TZipFile with compression (if it
> doesn't already have) and use it as our custom help file format for
> our company applications.

I've already been working on a general compression/archive interface, 
based on the Abbrevia approach. Unfortunately Abbrevia at that time 
already had become so buggy, that I designed a better interface for the 
integration of compression modules of any kind. It proved to be usable 
with most archives, like rpm/cpio, tar/gz and zip. Finally I stopped 
working on porting more modules to Pascal, when I found that 7zip 
already has implemented such an interface, and also has solved the 
integration of existing compressors.

I like the idea of integrating existing code for the worker objects, so 
that the evolution of existing and new modules (almost in C code) is 
decoupled from the interface itself. I only don't like the 7zip 
implementation in C++, because it is not portable.

My approach consists of both Delphi classes, encapsulating the various 
kinds of archives, as well as a generalized component for the visual 
interface. The single-component model was inspired by database 
components, which also can be connected to various kinds of databases. 
The interface effectively consists of an set of fixed attributes and 
methods, common to all archivers, and archive-specific attributes and 
features, accessible as name/value string pairs. I'm willing to resume 
my work on this approach, if somebody familiar with C can implement the 
low level stuff (calls to the worker C code).

DoDi




More information about the Lazarus mailing list