Data Compression (Summer 2023) - Lecture 15 - Infinite Precision in Finite Bits @billbird2597
Data Compression (Summer 2023) - Lecture 15 - Infinite Precision in Finite Bits  @billbird2597
Uploaded June 2023 | Updated November 2026, 4 hours ago
Note: There are some typos in the pseudocode at the end of this video. See below for details.

This video was made as part of a fourth-year undergraduate course covering an overview of Data Compression.

0:00 Introduction
0:53 Infinite Precision
4:07 How many bits do we need?
28:48 Integer Arithmetic Coding
1:17:55 Underflow
1:32:50 Encoding Pseudocode
1:36:12 Decoding

All slides and diagrams are original content (developed between 2019 and 2023).

As any viewer will quickly realize, these videos were made just like in-person lectures: in one sitting, with no breaks, editing or script. If you find any of this helpful or interesting, please let me know (I really appreciate any other feedback as well).

There are some mistakes in the pseudocode for encoding (slide 127) and decoding (slide 131) at the end of the video:
- There should be an extra " - 1" at the end of the formula to update the variable "high" on line 10 of the encoding pseudocode and line 14 of the decoding pseudocode (i.e. the line should be "high = low + w*CFhigh(c)/T - 1"). It is clear from the earlier slides that this extra -1 is needed (e.g. see slide 33).
- The if/else block in the inner loop that starts on line 12 of the encoding pseudocode and line 16 of the decoding pseudocode should have an extra "else" clause which contains a "break" statement (such that if the MSBs do not match and the 2nd most significant bits also do not match, the inner loop will end).

For added certainty, a complete C++ implementation of a basic arithmetic coder, originally provided as part of the course materials and based on the algorithms in this lecture, has also been posted: github.com/billbird/arith32

The posted code might also be helpful if you want specifics on the low-level bitwise manipulations required for the algorithms.
Data Compression (Summer 2023) - Lecture 15 - Infinite Precision in Finite BitsC Programming Practice (Fall 2023) - 12.01 - Linked ListsC++ Programming (Spring 2022) - Lecture 10.09 - Writing an Iterator (Part 2)Algorithm Science (Summer 2025) - 30 - Disjoint SetsC Programming Practice (Fall 2023) - 11.01 - Structure TypesC++ Programming (Spring 2022) - Lecture 6.04 - Class Member InitializationAlgorithm Science (Summer 2025) - 39 - Network Flows IIIC++ Programming (Spring 2022) - Lecture 10.05 - Writing a Vector (Part 3)C++ Programming - Spring 2022 - Lecture 10.02 - Memory LeaksC++ Programming (Spring 2022) - Lecture 4.03 - Sequences and CollectionsC++ Programming (Spring 2022) - Lecture 3.07 - Exception Mechanics (Part 2)C++ Programming (Spring 2022) - Lecture 2.12 - Tracing with References (Example 2)
BillBird |

Data Compression (Summer 2023) - Lecture 15 - Infinite Precision in Finite Bits

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER