How can i compress a data base?

A small source code will help.

Thanks in advance.