~grego/ljpeg-rust

Fast, no dependency decoder and encoder of lossless JPEG.
Fix the `decode_to_buffer` expecting invalid width
Initial commit

refs

master
browse  log 

clone

read-only
https://git.sr.ht/~grego/ljpeg-rust
read/write
git@git.sr.ht:~grego/ljpeg-rust

You can also use your local clone with git send-email.

Fast, no dependency decoder and encoder of the original lossless JPEG format. A lot of the code is used from dnglab, with modifications for use as a standalone library and some improvements.

Based on the limited testing on the author's machine, the decoder is about 2.5x faster than lj92.c, which is faster than Adobe DNG SDK. This difference is not very important for decoding a single frame, but for real time video playback, it is crucial. It's worth noting that no vectorization or multithreading is used, since the decoding algorithm is very sequencial.

There is probably some room for improvements for the encoder performance, although it is far from slow (and probably faster than lj92).

#no_std support

Virtually everything in this crate is no_std. The alloc crate is required for the encoder and for the decoder to store the Huffman table, but this could potentially be worked around. The (default) std feature flag only enables the implementation of std::error::Error on the error types.