[Gambas-user] gb.compress.zlib

Tobias Boege tobs at taboege.de
Fri Aug 6 23:00:11 CEST 2021


On Fri, 06 Aug 2021, Nuna Yabiznez wrote:
> On Fri, Aug 6, 2021 at 3:57 AM Tobias Boege via User <
> user at lists.gambas-basic.org> wrote:
> 
> > On Fri, 06 Aug 2021, Nuna Yabiznez wrote:
> > > There seems to be absolutely no documentation for gb.compress.zlib.
> > > Can someone give me some guidance on where to find such things as methods
> > > and properties, and how to invoke them?
> >
> > gb.compress.zlib and gb.compress.bzlib2 are both "drivers" that the
> > interface component gb.compress can use. So look at the gb.compress
> > documentation (in particular Compress.Type and Compress.Open).
> >
> > This is the same as with the database interface component gb.db and
> > its drivers gb.db.sqlite3, gb.db.mysql, gb.db.postgresql, etc.
> > gb.db provides a uniform interface and the drivers implement it for
> > specific databases. You have no documentation for gb.db.sqlite3
> > because it is the sqlite3-specific version of gb.db.
> >
> I already looked in there, all it did was send me to zlib.org.
> All the documentation is for versions of c.  I am NOT a c programmer so
> it's all gibberish to me.
> 

If by "in there" you mean the souce code, then yes, there is no Gambas
documentation there. You have to go here:

  gb.compress overview:        http://gambaswiki.org/wiki/comp/gb.compress
  Compress class overview:     http://gambaswiki.org/wiki/comp/gb.compress/compress
  Compress.Open documentation: http://gambaswiki.org/wiki/comp/gb.compress/compress/open

The last page has an example usage of Compress in Gambas. If you want to
use zlib, then change the ´.Type = "bzlib2"` line to `.Type = "zlib"`.

Best,
Tobias

-- 
"There's an old saying: Don't change anything... ever!" -- Mr. Monk


More information about the User mailing list