Skip to content

vir2alexport/zc.bz2storage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ZODB storage wrapper for bz2 compression of database records

Introduction

The zc.bz2storage package provides ZODB storage wrapper implementations that provides compression of database records.

Bz2 version gives significant improvement of the compression. Originally, tested on JSON format 368kb string which resulted: 103kb zc.zlibstorage 78kb zc.bz2storage

Table of contens

Installation

pip install git+https://github.com/vir2alexport/zc.bz2storage

Usage

from ZODB import FileStorage, DB

import bz2
import zc.bz2storage
import transaction

#	create storage
storage = zc.bz2storage.Bz2Storage(FileStorage.FileStorage('zcdata.fs'))
#	create DB that uses our storage
db = DB(storage)
#	open DB connection object
connection = db.open()
#	get the root access
root = connection.root()

#	Now you can use root.items() to list DB
for doc in root.items():
    print(doc)

Credits

See src/bc/bz2storage/README.txt.

Releases

No releases published

Packages

No packages published

Languages