index.html // ^^^^^^^^^^^^^^^ // // or just make ...ceteris paribus (everything necessary to // make the same thing happen being inserted in the makefile). ?> The Walrus Binary Entropy Coder

The Walrus Binary Entropy Coder

version 0.8
 

Arithmetic coders do their job so well that they're nearly synonymous with it. The Walrus is an example of a coder that does the same job very nearly as well, using a different kind of mapping between symbols and bits.

This essay is literate Python (block comments interspersed with code) that clarifies the job requirements and pinpoints where coders can differ and still meet the requirements. The code includes both coders, and correctness tests, and there's a separate notebook that compares the two coders' efficiency.

The full piece (45K .txt)

The file is renamed .txt here because of an issue with my web server's configuration.

The section about efficiency is below in images-inlined HTML as well as the original ipynb form.

"The paper as literate code", "walrus_effish_graphs.ipynb" => "[N] (Jupyter notebook source)", "walrus_effish_graphs.html" => "[N] Notebook as HTML with efficiency graphs", "test1_12.out" => "Data used by the Jupyter notebook" ); $subst_url = array( ); echo "\n"; exec( "/bin/ls -ld Makefile *.jpg *.png *.txt *.html *.ipynb *.out", $lines ); foreach( $lines as $line ) { echo "\n"; $parts=explode( " ", $line ); foreach( $parts as $path ) { } ; // Empty loop leaves path as last part $pieces=explode( "/", $path ); foreach( $pieces as $file ) { } ; // Empty loop leaves file as last part $size=ceil( filesize($file) / 1024 ); echo '\n"; if( isset( $cmt[$file] ) ) { echo "\n"; } echo "\n\n"; } echo "
'; if( isset( $subst_url[$file] ) ) $url = $subst_url[ $file ]; else $url = $file; if( $line[0]=="d" ) { echo "$file/"; } else { echo "$file (${size}K)"; } echo "$cmt[$file]
\n"; ?>

Walrus with bucket Eggman with chicken and eggs Arithmetic coders slice pies;
the Walrus subdivides brownies.
   
This static page was made with a php script. Last change
--Steve Witham Up to my temporary home page.