An implementation of Deflate in Coq
Christoph-Simon Senjak, Martin Hofmann

TL;DR
This paper presents a rigorously formalized and verified implementation of the Deflate compression algorithm in Coq, clarifying ambiguities in the standard and proving the correctness of compression and decompression as inverse functions.
Contribution
It provides the first verified Coq implementation of Deflate, including a formal specification of prefix-free codes and a proof of inverse correctness for compression and decompression.
Findings
Achieved competitive performance on large inputs
First formal proof of inverse relationship between compression and decompression
Demonstrated compatibility with existing Deflate implementations
Abstract
The widely-used compression format "Deflate" is defined in RFC 1951 and is based on prefix-free codings and backreferences. There are unclear points about the way these codings are specified, and several sources for confusion in the standard. We tried to fix this problem by giving a rigorous mathematical specification, which we formalized in Coq. We produced a verified implementation in Coq which achieves competitive performance on inputs of several megabytes. In this paper we present the several parts of our implementation: a fully verified implementation of canonical prefix-free codings, which can be used in other compression formats as well, and an elegant formalism for specifying sophisticated formats, which we used to implement both a compression and decompression algorithm in Coq which we formally prove inverse to each other -- the first time this has been achieved to our…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsAlgorithms and Data Compression · Network Packet Processing and Optimization · Advanced Data Storage Technologies
