mp_cmpr.c File Reference

#include "config.h"
#include <sys/types.h>
#include <string.h>
#include <errno.h>
#include "db_int.h"
#include "db_page.h"
#include "shqueue.h"
#include "db_shash.h"
#include "mp.h"
#include "common_ext.h"
#include "zlib.h"

Go to the source code of this file.


struct  _cmprmeta


#define CMPR_DIVIDE(n)   ((n) >> (dbenv->mp_cmpr_info->coefficient))
#define CMPR_MAX   (dbenv->mp_cmpr_info->max_npages)
#define CMPR_META_NORMAL   0x01
#define CMPR_MULTIPLY(n)   ((n) << (dbenv->mp_cmpr_info->coefficient))


typedef struct _cmprmeta CMPRMETA


static int __memp_cmpr_info_valid (DB_ENV *dbenv, DB_CMPR_INFO *cmpr_info)
static int __memp_cmpr_page (DB_MPOOLFILE *dbmfp, CMPR *cmpr, DB_IO *db_io, ssize_t *niop)
static int __memp_cmpr_page __P ((DB_MPOOLFILE *, CMPR *, DB_IO *, ssize_t *))
int CDB___memp_cmpr (DB_MPOOLFILE *dbmfp, BH *bhp, DB_IO *db_io, int flag, ssize_t *niop)
int CDB___memp_cmpr_alloc (DB_MPOOLFILE *dbmfp, db_pgno_t *pgnop, size_t pagesize, BH *bhp, int *first_nonreused_chain_posp)
int CDB___memp_cmpr_alloc_chain (DB_MPOOL *dbmp, BH *bhp, int alloc_type)
int CDB___memp_cmpr_close (DB_ENV *dbenv, DB_MPOOLFILE *dbmfp)
u_int8_t CDB___memp_cmpr_coefficient (DB_ENV *dbenv)
int CDB___memp_cmpr_create (DB_ENV *dbenv, DB_FH *fhp, size_t pgsize, int flags)
int CDB___memp_cmpr_deflate (DB_ENV *dbenv, const u_int8_t *inbuff, int inbuff_length, u_int8_t **outbuffp, int *outbuff_lengthp, void *user_data)
int CDB___memp_cmpr_free (DB_MPOOLFILE *dbmfp, db_pgno_t pgno, size_t pagesize)
int CDB___memp_cmpr_free_chain (DB_MPOOL *dbmp, BH *bhp)
int CDB___memp_cmpr_inflate (DB_ENV *dbenv, const u_int8_t *inbuff, int inbuff_length, u_int8_t *outbuff, int outbuff_length, void *user_data)
int CDB___memp_cmpr_open (DB_ENV *dbenv, MPOOLFILE *mfp, const char *path)
int CDB___memp_cmpr_read (DB_MPOOLFILE *dbmfp, BH *bhp, DB_IO *db_io, ssize_t *niop)
int CDB___memp_cmpr_read_meta (DB_ENV *dbenv, DB_FH *fhp, void *buff, size_t buff_length, ssize_t *nrp)
int CDB___memp_cmpr_write (DB_MPOOLFILE *dbmfp, BH *bhp, DB_IO *db_io, ssize_t *niop)


static DB_CMPR_INFO default_cmpr_info
static const char sccsid [] = "@(#)mp_cmpr.c 1.1 (Senga) 01/08/99"

Generated on Sun Jun 8 10:56:53 2008 for GNUmifluz by  doxygen 1.5.5