by billyhoffman · 2y ago · 0 comments
Apparently Zopfli = small sweet breat
And write it in Rust
For example in C++ array[index] has Undefined Behaviour on a bounds miss. Rust's array[index] will panic at runtime on a bounds miss, at least we know what will happen but what happens isn't great... WUFFS array[index] will not compile if it could incur a bounds miss. Show the compiler why index will be a value that's always in-bounds when the index occurs.
$ git clone --quiet --depth=1 https://github.com/google/wuffs.git
$ gcc -O3 wuffs/example/mzcat/mzcat.c -o my-mzcat
$ ./my-mzcat < linux-6.8.2.tar.xz | sha256sum
d53c712611ea6cb5acaf6627a84d5226692ae90ce41ee599fcc3203e7f8aa359 -
$ /usr/bin/xz -d < linux-6.8.2.tar.xz | sha256sum
d53c712611ea6cb5acaf6627a84d5226692ae90ce41ee599fcc3203e7f8aa359 -
(†) Also, I'm not "Jia Tan"! You're just going to have to trust me on both of those claims. :-/Still, Wuffs doesn't use autotools, and if you're pulling the library from the https://github.com/google/wuffs-mirror-release-c repository then that repo doesn't even contain any binary-data test files.
I’ve never seen a .tar.br file, but I frequently download .tar.xz files.
And therefore, a Rust implementation by Google of xz compression and decompression would be most welcome :)