## Arithmetic Coding with Folds and Unfolds (2003)

### Cached

### Download Links

- [web.comlab.ox.ac.uk]
- [www.comlab.ox.ac.uk]
- [www.cs.ox.ac.uk]
- DBLP

### Other Repositories/Bibliography

Venue: | Advanced Functional Programming, 4th International Summer School |

Citations: | 9 - 4 self |

### BibTeX

@INPROCEEDINGS{Bird03arithmeticcoding,

author = {Richard Bird and Jeremy Gibbons},

title = {Arithmetic Coding with Folds and Unfolds},

booktitle = {Advanced Functional Programming, 4th International Summer School},

year = {2003},

publisher = {Springer-Verlag}

}

### OpenURL

### Abstract

Introduction Arithmetic coding is a method for data compression. Although the idea was developed in the 1970's, it wasn't until the publication of an "accessible implementation " [14] that it achieved the popularity it has today. Over the past ten years arithmetic coding has been refined and its advantages and disadvantages over rival compression schemes, particularly Hu#man [9] and Shannon-Fano [5] coding, have been elucidated. Arithmetic coding produces a theoretically optimal compression under much weaker assumptions than Hu#man and Shannon-Fano, and can compress within one bit of the limit imposed by Shannon's Noiseless Coding Theorem [13]. Additionally, arithmetic coding is well suited to adaptive coding schemes, both character and word based. For recent perspectives on the subject, see [10, 12]. The "accessible implementation" of [14] consisted of a 300 line C program, and much of the paper was a blow-by-blow description of the workings of the code. There was little in the way

### Citations

6050 |
A mathematical theory of communication
- Shannon
- 1948
(Show Context)
Citation Context ...ng produces a theoretically optimal compression under much weaker assumptions than Huffman and Shannon-Fano, and can compress within one bit of the limit imposed by Shannon’s Noiseless Coding Theore=-=m [13]. Ad-=-ditionally, arithmetic coding is well suited to adaptive coding schemes, both character and word based. For recent perspectives on the subject, see [10, 12]. The “accessible implementation” of [14... |

942 |
A method for the construction of minimum redundancy codes
- Huffman
- 1952
(Show Context)
Citation Context ...[14] that it achieved the popularity it has today. Over the past ten years arithmetic coding has been refined and its advantages and disadvantages over rival compression schemes, particularly Huffman =-=[9]-=- and Shannon-Fano [5] coding, have been elucidated. Arithmetic coding produces a theoretically optimal compression under much weaker assumptions than Huffman and Shannon-Fano, and can compress within ... |

664 |
Arithmetic coding for data compression
- Witten, Neal, et al.
- 1987
(Show Context)
Citation Context ...g, Parks Road, Oxford, OX1 3QD, UK Arithmetic coding is a method for data compression. Although the idea was developed in the 1970’s, it wasn’t until the publication of an “accessible implementa=-=tion” [14]-=- that it achieved the popularity it has today. Over the past ten years arithmetic coding has been refined and its advantages and disadvantages over rival compression schemes, particularly Huffman [9] ... |

298 | Functional programming with bananas, lenses, envelopes and barbed wire
- Meijer, Fokkinga, et al.
- 1991
(Show Context)
Citation Context ...Nothing That’s essentially all the Report says on unfolds! We will have more to say about them later on. 3.2 Hylomorphisms One well-known pattern involving folds and unfolds is that of a hylomorphis=-=m [11], n-=-amely a function h whose definition takes the form h = foldr f e · unfoldr g The two component computations have complementary structures and they can be fused into one: hz= case gzof Nothing → e J... |

215 |
Introduction to Functional Programming using Haskell, 2nd edition
- Bird
- 1998
(Show Context)
Citation Context ...s for coding and decoding. Our development of arithmetic coding makes heavy use of the algebraic laws of folds and unfolds. Although much of the general theory of folds and unfolds is well-known, see =-=[3, 6]-=-, we will need one or two novel results. One concerns a new pattern of computation, which we call streaming. In streaming, elements of an output list are produced as soon as they are determined. This ... |

139 | Arithmetic coding revisited
- Moffat, Neal, et al.
- 1998
(Show Context)
Citation Context ...posed by Shannon’s Noiseless Coding Theorem [13]. Additionally, arithmetic coding is well suited to adaptive coding schemes, both character and word based. For recent perspectives on the subject, se=-=e [10, 12]. Th-=-e “accessible implementation” of [14] consisted of a 300 line C program, and much of the paper was a blow-by-blow description of the workings of the code. There was little in the way of proof of w... |

105 |
Transmission of information
- Fano
- 1949
(Show Context)
Citation Context ... the popularity it has today. Over the past ten years arithmetic coding has been refined and its advantages and disadvantages over rival compression schemes, particularly Huffman [9] and Shannon-Fano =-=[5]-=- coding, have been elucidated. Arithmetic coding produces a theoretically optimal compression under much weaker assumptions than Huffman and Shannon-Fano, and can compress within one bit of the limit ... |

70 |
98: A Non-strict, Purely Functional Language
- Haskell
- 1999
(Show Context)
Citation Context ... otherwise = Nothing Exercise 17. Give an equivalent definition of nextBit in terms of narrowing by non-sub-unit intervals. We leave it as an exercise to show foldr pack ( 1 /2) bs = foldr pack 0(bs +=-=[1]) -=-Thus fromBits bs returns the binary fraction obtained by adding a final 1 to the end of bs. The definition of toBits has a simple reading: if r ≤ 1 /2, then the binary expansion of any fraction x su... |

56 | Arithmetic coding for data compression
- Howard, Vitter
- 1994
(Show Context)
Citation Context ...Section 8 we are going to replace fractional arithmetic by arithmetic with limited-precision integers. In order to do so we need a preparatory step: interval expansion. Quoting from Howard and Vitter =-=[8]-=-: The idea is to prevent the current interval from narrowing too much when the endpoints are close to 1 /2 but straddle 1 /2. Inthatcasewedo not yet know the next output bit, but we do know that whate... |

48 | Datatype-generic programming
- Gibbons
- 1999
(Show Context)
Citation Context ...s for coding and decoding. Our development of arithmetic coding makes heavy use of the algebraic laws of folds and unfolds. Although much of the general theory of folds and unfolds is well-known, see =-=[3, 6]-=-, we will need one or two novel results. One concerns a new pattern of computation, which we call streaming. In streaming, elements of an output list are produced as soon as they are determined. This ... |

24 | The third homomorphism theorem
- Gibbons
- 1996
(Show Context)
Citation Context ...t telling the whole story here. Theorem 8 (First Duality Theorem [3]). If f is associative with unit e, then foldl f e xs = foldr f e xs for all finite lists xs. Theorem 9 (Third Homomorphism Theorem =-=[7]). If -=-both h = foldl f1 e and h = foldr f2 e, then there is an associative f with unit e such that h = foldr f e. From Theorem 8 and Exercise 2, we have foldl (⊲) unit = foldr (⊲) unit So why don’t we... |

9 |
Novel design of arithmetic coding for data compression
- Jiang
- 1995
(Show Context)
Citation Context ...posed by Shannon’s Noiseless Coding Theorem [13]. Additionally, arithmetic coding is well suited to adaptive coding schemes, both character and word based. For recent perspectives on the subject, se=-=e [10, 12]. Th-=-e “accessible implementation” of [14] consisted of a 300 line C program, and much of the paper was a blow-by-blow description of the workings of the code. There was little in the way of proof of w... |

1 |
Libraries for Haskell 98. Available online at www.haskell.org/onlinelibrary
- Standard
(Show Context)
Citation Context ...ecause membership of the type class Enum does not actually imply membership of Ord in Haskell; the comparison is done instead by using fromEnum and comparing the integers.) The Haskell Library Report =-=[2] states:-=- The unfoldr function undoes a foldr operation. . . : unfoldr f ′ (foldr f z xs) =xs if the following holds: f ′ (f x y)=Just (x , y) f ′ z = Nothing That’s essentially all the Report says on ... |