A bug in zdelta-2.1 was found during my experiment. The bug causes memcpy() to fail because of a computation of memory location overflown.
Provided below is a bugfix for this integer overflown bug, as well as a change of macro naming convetion. Since zdelta was modified based on zlib, a few macro definition has naming conflict with zlib. If people, like me, try to include them in the same source file, it would be really troublesome.