Skip to main content

Functional Specification of JPEG Decompression, and an Implementation for Free

  • Conference paper
Programming Paradigms in Graphics

Part of the book series: Eurographics ((EUROGRAPH))

  • 48 Accesses

Abstract

A decoder for images compressed by the JPEG algorithm is stated in the pure functional programming language Gofer. The program can be regarded as a mathematical specification of the decompression algorithm; the concise description (which is included almost in full) is very suitable for learning about the algorithm. At the same time the ‘specification’ is an executable program, which shows the usefulness of a functional programming language as a prototyping tool for graphics algorithms.

All functions are defined as much as possible at the function level, i.e., as compositions of other functions. A tutorial on the important concept of a ‘State Monad’, which plays an important role in the program, is included. From a functional programming theoretical point of view, the new technique of currying a state monad, which is introduced, and its application in the program, are interesting.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Richard Bird and Philip Wadler. Introduction to functional programming. New York: Prentice Hall, 1988.

    Google Scholar 

  2. Pieter Hartel and Willem Vree. ‘Arrays in a lazy functional language — a case study: the Fast Fourier Transform’. In: 2nd Arrays, functional languages, and parallel systems (G. Hains, ed.). Montréal: Dept. d’informatique, Université de Montréal (publication 841), 1992, pp. 52–66.

    Google Scholar 

  3. Hudak and Fasel. ‘A gentle introduction to Haskell’. ACM Sigplan Notices 27, 5 (may 1992), pp. Tl—T53.

    Google Scholar 

  4. Mark P. Jones. ‘A system of constructor classes: overloading and implicit higher-order polymorphism’. In: FPCA ‘83: Conference on Functional Programming and Computer Architecture. New York: ACM Press, 1993. http://www.cs.nott.ac.uk/Department/Staff/mpj/fpca93.html

  5. Mark P. Jones. Gofer 2.30 release notes. ftp.cs.nott.ac.uk/nott-fp/languages/gofer.

    Google Scholar 

  6. Mark P. Jones. ‘Functional programming with overloading and higher-order polymorphism’. In: Lecture Notes of the 1st International Spring School on Advanced Functional Programming Techniques (Johan Jeuring and Erik Meijer, eds). Berlin: Springer, 1995 (LNCS 925).

    Google Scholar 

  7. International Standards Organization. Digital compression and coding of continuous-tone still images. Draft International Standard DIS 10918–1. (reprinted in [8]).

    Google Scholar 

  8. William Pennebaker and Joan Mitchell. JPEG still image data compression standard. New York: Van Nostrand Reinhold, 1993.

    Google Scholar 

  9. Rinus Plasmeijer and Marko van Eekelen. Concurrent Clean Language Report. Nijmegen: Dept. of Computer Science, University of Nijmegen, the Netherlands, 1995 (to appear). ftp.cs.kun.nl/pub/Clean.

    Google Scholar 

  10. Philip Wadler. ‘The Essence of Functional Programming’. In: 19th Annual ACM SIGPLAN Symposium on Principles of Programming Languages. Santa Fe, 1992 (pp. 1–14 ). also: ftp.dcs.glasgow.ac.uk/pub/glasgow-fp/papers/essence-of-fp.ps.Z.

    Google Scholar 

  11. Gregory Wallace. ‘The JPEG still picture compression standard’. Communications of the ACM 34,4, 1991 (pp. 30 14). also: ftp.uu.net/graphics/jpeg/wallace.ps.gz.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 1995 Springer-Verlag/Wien

About this paper

Cite this paper

Fokker, J. (1995). Functional Specification of JPEG Decompression, and an Implementation for Free. In: Veltkamp, R.C., Blake, E.H. (eds) Programming Paradigms in Graphics. Eurographics. Springer, Vienna. https://doi.org/10.1007/978-3-7091-9457-7_8

Download citation

  • DOI: https://doi.org/10.1007/978-3-7091-9457-7_8

  • Publisher Name: Springer, Vienna

  • Print ISBN: 978-3-211-82788-8

  • Online ISBN: 978-3-7091-9457-7

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics