chess
libdeflate
chess | libdeflate | |
---|---|---|
3 | 7 | |
1 | 934 | |
- | - | |
0.0 | 8.8 | |
over 1 year ago | 3 days ago | |
C | C | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
chess
-
Quite OK Image is now my favorite asset format
I think it's in the title: assets. The example case is replacing the BMP assets used by a game with QOI with a resulting 10x size reduction: https://github.com/skeeto/chess/commit/5c123b3
I think this functions as a test case. For a game as simple as a chess UI, PNG would probably be fine unless you're code-golfing on the final output binary or refusing to use common dependencies. But for some programs (e.g. large video games), preloading all your assets is very common and decoding speed can be crucial. Maybe the assets could even be left in compressed form in memory in order to reduce the system requirements? I'm not sure if this is common or not.
-
Is there a way to embed textual data in the binary and then free it when you need?
However, I don't really like the constraints this imposes, so I prefer my #include trick. In real programs I don't actually rely on xxd (part of Vim), and instead write a custom embed tool as part of the build. It's only a few lines of code to match the standard input behavior of xxd.
-
Looking for feedback on my Chess game
https://github.com/skeeto/chess/commit/9cc8c60 (depends on Vim xxd)
libdeflate
- Ebiggers/libdeflate: Heavily optimized DEFLATE/zlib/gzip library
-
Introducing zune-inflate: The fastest Rust implementation of gzip/Zlib/DEFLATE
zune-inflate is a port of libdeflate to safe Rust.
-
Quite OK Image is now my favorite asset format
> The QOI benchmarks shows it only lagging a small bit behind PNG in compression ratio, while performing much faster (multiples) in both encoding and decoding.
Presumably that’s with stock libpng, which uses zlib. I wonder if anyone tried patching it to use the substantially faster (on x86) libdeflate[1] instead? It doesn’t do streaming, but you shouldn’t really need it for PNG textures.
[1] https://github.com/ebiggers/libdeflate
-
bitter v0.6 - the performant bit reading library with a new faster API
Eric biggers libdeflate https://github.com/ebiggers/libdeflate/blob/master/lib/deflate_decompress.c
-
Computing Adler32 Checksums at 41 GB/s
Note that libdeflate has used essentially the same method since 2016 (https://github.com/ebiggers/libdeflate/blob/v0.4/lib/adler32...), though I recently switched it to use a slightly different method (https://github.com/ebiggers/libdeflate/blob/v1.12/lib/x86/ad...) that performs more consistently across different families of x86 CPUs.
-
Zlib – a spiffy yet delicately unobtrusive compression library
Going away from Zlib proper but staying with its format, there’s libdeflate[1], an implementation that’s substantially faster on modern machines but can’t stream, and of course Zopfli[2], a glacially slow compressor that’s somewhat better (and occasionally much more so).
[1] https://github.com/ebiggers/libdeflate
[2] https://github.com/google/zopfli
- Firefox's Optimized Zip Format: Reading Zip Files Quickly
What are some alternatives?
EightThirtyTwoDemos - Demo projects for the EightThirtyTwo CPU
zlib-ng - zlib replacement with optimizations for "next generation" systems.
CompactGUI - Transparently compress active games and programs using Windows 10/11 APIs
ZLib - A massively spiffy yet delicately unobtrusive compression library.
chess
zlib - Cloudflare fork of zlib with massive performance improvements
qoipond - Lossless image format inspired by QOI “Quite OK Image” format
zlib
Zpng - Better lossless compression than PNG with a simpler algorithm
fpng - Super fast C++ .PNG writer/reader
HexFiend - A fast and clever hex editor for macOS
miniz_oxide - Rust replacement for miniz