Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add zlib-ng 2.2.3 #109

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add zlib-ng 2.2.3 #109

wants to merge 1 commit into from

Conversation

data-man
Copy link
Contributor

No description provided.

@Neustradamus
Copy link

@data-man: Can you update your PR with latest zlib-ng?

@data-man
Copy link
Contributor Author

Can you update your PR with latest zlib-ng?

Sure, I'll try today.

@stefano2734
Copy link

Actual version of Zlib-ng is 2.2.3. 2.1.0 is quite old and normally 2.2.3 is done here.

@data-man
Copy link
Contributor Author

I'm working on this, some progress with -march=native and ucd.all.flat.xml from ucd.all.flat.zip:
$ ./lzbench -l

zlib 1.2.11 [1-9]
zlib-ng 2.2.3 [1-9]

$ ./lzbench -ezlib,2,5/zlib-ng,2,5/zstd,2,5 ucd.all.flat.xml

lzbench 1.9 (64-bit Linux)  Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
Assembled by P.Skibinski

Compressor name         Compress. Decompress. Compr. size  Ratio Filename
memcpy                   7175 MB/s  7212 MB/s   234530179 100.00 ucd.all.flat.xml
zlib 1.2.11 -2            425 MB/s  1184 MB/s    13207890   5.63 ucd.all.flat.xml
zlib 1.2.11 -5            193 MB/s  1291 MB/s    10539660   4.49 ucd.all.flat.xml
zlib-ng 2.2.3 -2          626 MB/s  1544 MB/s    13421093   5.72 ucd.all.flat.xml
zlib-ng 2.2.3 -5          295 MB/s  1708 MB/s     9922955   4.23 ucd.all.flat.xml
zstd 1.5.5 -2            1565 MB/s  3994 MB/s     8906930   3.80 ucd.all.flat.xml
zstd 1.5.5 -5             577 MB/s  3948 MB/s     8248442   3.52 ucd.all.flat.xml
done... (cIters=1 dIters=1 cTime=1.0 dTime=2.0 chunkSize=1706MB cSpeed=0MB)

@data-man data-man changed the title Add zlib-ng 2.1.0.devel Add zlib-ng 2.2.3 Jan 20, 2025
@data-man
Copy link
Contributor Author

Updated to zlib-ng 2.2.3.
I think CPU optimization can be enabled later.
Small patches:
In zlib-ng.h

-typedef uint32_t (*zng_in_func) (void *, const uint8_t * *);
-typedef int32_t  (*zng_out_func) (void *, uint8_t *, uint32_t);
+typedef uint32_t (*in_func) (void *, const uint8_t * *);
+typedef int32_t  (*out_func) (void *, uint8_t *, uint32_t);

 Z_EXTERN Z_EXPORT
-int32_t zng_inflateBack(zng_stream *strm, zng_in_func in, void *in_desc, zng_out_func out, void *out_desc);
+int32_t zng_inflateBack(zng_stream *strm, in_func in, void *in_desc, out_func out, void *out_desc);
 /*

In infback.c

-int32_t Z_EXPORT PREFIX(inflateBack)(PREFIX3(stream) *strm, zng_in_func in, void *in_desc, zng_out_func out, void *out_desc) {
+int32_t Z_EXPORT PREFIX(inflateBack)(PREFIX3(stream) *strm, in_func in, void *in_desc, out_func out, void *out_desc) {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants