Improving LZXpress decompression/compression algorithms

Douglas Bagnall douglas.bagnall at
Fri Apr 2 01:06:31 UTC 2021

On 1/04/21 9:13 pm, Matt Suiche via samba-technical wrote:
> First of all, thanks a lot to Douglas Bagnall for the assistance.
> While I was revisiting the LZXpress implementation, I discovered that the 2
> official documented cases from MS-XCA were not supported:
> The attached implementation includes bug fixes in the decompression
> algorithm, a rewrite of the compression function and additional tests as it
> only had a single test.

I have created a merge request from these patches:

Two things:

1. Patch 1/2 lacks the Signed-off-by.

2. The build fails on this line:

 ../../lib/compression/lzxpress.c:356:4: error: for loop initial
declarations are only allowed in C99 mode
     for (int i = 0; i < length; i++) {
Our style is to declare `int i;` (or likely better, `size_t i;`) at the
top of the function.

(Interestingly it is only the Centos 7 compile that failed on this).

I will attempt a full review after easter.


More information about the samba-technical mailing list