The author described it as:
memutils.lua

contains several routines that have C equivalents, such as memset, memcpy,
memcmp, memchr, memmove. Also contains a few convenience functions related
to dealing with chunks of memory.

Probably it's an example to show the simplicity of lua/luajit.
On May 1, 2014 12:46 AM, "huangxin" <chrox.huang@gmail.com> wrote:

> I forgot to mention that MD5.lua and it's dependencies memutils and
> stringzutils are from [LAPHLibs](https://github.com/Wiladams/LAPHLibs)
> with a little patch to fix an overflow bug on ARM cpu.
>
> In frontend/memutils.lua:
>
> > +	end
> > +
> > +	return dst, len
> > +end
> > +
> > +return {
> > +	bcmp = bcmp,
> > +	bcopy = bcopy,
> > +	bzero = bzero,
> > +
> > +	memchr = memchr,
> > +	memcpy = memcpy,
> > +	memcmp = memcmp,
> > +	memmove = memmove,
> > +	memset = memset,
> > +
>
> just curious, why not use the functions from ffi.C ?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/koreader/koreader/pull/562/files#r12152321>
> .
>