[Zlib-devel] Causality question
John Reiser
jreiser at bitwagon.com
Fri Mar 15 16:35:26 EDT 2013
> that does mean that using byte copies is mandatory (eg memmove() not
> memcpy()) instead of faster copy variants
Overlap can be detected in one compare+branch of length vs. offset.
When copying, it can pay to overrun the destination by a few bytes,
particularly when not near the end of the whole buffer, and if the
penalty for unaligned access is small. UPX does this
(http://upx.sourceforge.net)
--
More information about the Zlib-devel
mailing list