#jpeg #lossless #codec #real-time #lj92

ljpeg

Fast, no dependency lossless JPEG decoder and encoder

2 releases

0.1.2 Dec 2, 2024
0.1.1 May 8, 2024
0.1.0 Apr 24, 2024

#528 in Images

Download history 4/week @ 2024-09-18 4/week @ 2024-09-25 2/week @ 2024-10-09 2/week @ 2024-10-16 106/week @ 2024-11-27 51/week @ 2024-12-04 17/week @ 2024-12-11

103 downloads per month

LGPL-2.1

76KB
1.5K SLoC

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.

no_std support

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.

No runtime deps