zlib/gzip + anydbm or ...

Gerhard Häring gerhard at bigfoot.de
Wed Jun 19 03:02:25 EDT 2002


* James T. Dennis <jadestar at idiom.com> [2002-06-19 03:40 +0000]:
> 
>  Is there an obvious and simple way to use the existing standard
>  libraries to support transparently compressed dbm files?

I don't think so.

If at all, you'll need to hack dumbdbm to achieve this goal, I think
only two approaches are feasible:

- compress the whole file with zlib, this means you need to keep the
  whole file in memory
- compress only values with zlib

Option two could even be written with a simple wrapper around anydbm,
but will obviously only help if your average values are relatively
large.

Gerhard
-- 
This sig powered by Python!
Außentemperatur in München: 25.2 °C      Wind: 3.4 m/s





More information about the Python-list mailing list