This is part two of three in the series of articles that I’m writing about the JPEG specification. Part one came out more than one year ago and I had several other committments (namely I got a job now!) absorbing my time before I could turn my attention back to this unfinished series. Initially, I wanted part two to be the encoder, but then decided that implementing a decoder first would be more easier (in my honest opinion). And once you know how to write the decoder, the encoder will be the exact same steps, but in the reverse order!