zlib/gzip + anydbm or ...

Radovan Garabik spam at melkor.dnp.fmph.uniba.sk
Wed Jun 19 11:55:28 CEST 2002


Gerhard H?ring <gerhard at bigfoot.de> wrote:
 : * 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

or three:
 - compress the whole file with dictzip, then you can have random access
(see how dictd servers and tools do it, of course not with dbm, but with
their own database format)



-- 
 -----------------------------------------------------------
| Radovan Garabik  http://melkor.dnp.fmph.uniba.sk/~garabik |
| __..--^^^--..__         garabik @ fmph . uniba . sk       |
 -----------------------------------------------------------
Antivirus alert: file .signature infected by signature virus.
Hi! I'm a signature virus! Copy me into your signature file to help me spread!



More information about the Python-list mailing list