Which LZ do you need? LZO, LZ4, LZ77, LZ78, LZP, LZH, LZ77, LZSS, LZMA, LZW and more? There are many flavors, but you simply state LZ.
Lempel-Ziff on its own is more of an academic excercise and hardly used on its own.
Lempel-Ziff-Hoffman is a practical implementation and so is e.g the Lempel-Ziff-Storer-Symanski.
The code you link to isn't too clear about what is implemented. Just that it can do lossless compress and decompress.
It misses any academic reference.
(I suspect you just need a deflate)
All these algorithms are rather simple to implement for an intermediate programmer, but without knowing the flavor I can not help you.
Maybe zlib will work and comes as standard package in the fpc distribution. It is also standards conformant.
It contains extensive documentation in the sourcecode (so you need the package sourcecode -: zlib.pas. It also works to decompress Python compressed sources and vice-versa, so that may be the right one.