add C compatible compress and decompress methods

Added C compatible compress and decompress methods.