Skip to main content

Module encoder

Module encoder 

Source
Expand description

Minimal lossless JPEG encoder, used to build synthetic fixtures for tests, fuzzing seeds and malformed-input suites (not optimised).

Functionsยง

encode
Encode samples (height rows of width * comps interleaved values) as a lossless JPEG with predictor psv (1..=7) and a fixed Huffman table.
encode_with_restarts
encode with a restart interval of restart MCUs (0: none). Intervals must start at row starts; each one resets the first-column predictors, and other predictors keep reading the row above (as the decoder does).