RCSB PDB Protein Data Bank A Member of the wwPDB
An Information Portal to Biological Macromolecular Structures
PDB Home | Contact Us
next up previous contents
Next: About this document ... Up: Methods Previous: Write

Compress

NAME Compress

PROTOTYPE

#include "DICFileObj.h"

void DICFileObj::Compress(TblFileObj * ddl);
EXAMPLE

char *diags=NULL;
DICFileObj * fobjR = NULL;
ISTable *format;
ISTable *ddlformat;
DDLFileObj * ddl = NULL;

ddl = new DDLFileObj("ddl", WRITE_MODE, 80, "?", 1);
ddlformat = new ISTable("ddlformat");
ddl->Read("./test/ddl-mm",ddlformat, diags);

format = new ISTable("format");
fobjR = new DICFileObj("./test/TESTFILE6", WRITE_MODE, 80, "?", 0);
fobjR->Read("./test/dictionary.dic",ddl , format, diags);

fobjR->Compress(ddl);

fobjR->Write("./test/view2.dic",ddl,format);
fobjR->CloseFile(1);
if (fobjR) delete fobjR;
PURPOSE

Compress(char *, TblFileObj *, ISTable *) compresses dictionary i.e removes redundant rows from tables. Redundan rows are rows that have same key. What is key for paricular table is found in ddl.

RECEIVES

Write(char *, TblFileObj *, ISTable *)

ddl Pointer to TblFileObj that keeps information from ddl

RETURN VALUE

Returns 1 upon success, otherwise 0.

REMARKS

None



Olivera Tosic
6/12/2002

 

© RCSB PDB