编程与软件工程infinitepartitions.com编辑精选
解剖 gzip 格式
Dissecting the gzip format (2011)
2013 — 2024,它一次次回到首页
黑点是上首页(≥ 50 分)的那次投稿,空心点是没冲上去的投稿,点越大分数越高。
导读
这篇文章逐层拆解 gzip 文件格式,讲解其内部结构:DEFLATE 压缩算法、Huffman 编码、LZ77 滑动窗口等组成部分,帮助读者理解 gzip 到底是如何工作的。
为什么经久不衰:它把一个被广泛使用却少有人真正理解的格式讲得清晰透彻,十多年来反复登上 HN 首页,至今仍是学习压缩原理的经典入门材料。
HN 评论精选
希望有面向可读性和教学的高层语言压缩算法实现,方便学习和定制。
我很想看到一个以可读性和可内省性为优化目标(而非速度和内存)的 Python 或 Haskell 版 gzip 实现。这样你可以单步进入每个原语,以人类可读的形式查看中间结果,二进制编码放到单独一步。压缩算法会因此更容易学习理解,开发新的定制压缩方案也会比现在容易得多——如今你只能用现成的,或者从零开始。
vog查看英文原文
I would love to see a Python (or Haskell) implementation of gzip (and others) that is optimized for: * readability and * introspection rather than speed and memory usage. That way, you could step into every primitive, and see intermediate results in a human-readable representation (as provided by the programming language). Encoding that stuff to binary would always happen in a separate step. That way, those compression algorithms, with all details, would be easier to learn and to understand. Also, development of new, customized compression schemes would be a lot easier than it is today, where you either have to take existing ones, or have to start from scratch. A custom implementation might be as simple as a rearrangement and recombination of existing building blocks, or may introduce completely new (possibly domain specific) building blocks.
作者以此文为参考用 Julia 实现了 gunzip,证明文章讲解足够清晰可操作。
这篇文章非常棒,我参考它用 Julia 写了一个 gunzip 实现。
jvns查看英文原文
This article is pretty great. I used it as a reference to write gunzip in Julia: https://github.com/jvns/gzip.jl
推荐 Coursera 上实现 bzip 部分功能的算法课作业作为延伸学习。
稍微相关:这是我在 Coursera 算法课上最喜欢的作业之一,我们实现了 bzip 压缩和解压缩的一部分。
conexions查看英文原文
Slightly related. This was one of my favorite assignments from my algorithms class on coursera. We implemented part of bzip compression and decompression. http://coursera.cs.princeton.edu/algs4/assignments/burrows.html
历次讨论
同类还值得读
开源应用架构
The Architecture of Open Source Applications
《开源软件架构》(AOSA)是一本在线免费书,邀请知名开源项目的作者亲自剖析其内部设计,涵盖 SQLAlchemy、LLVM、Audacity、Apache、Bash 等系统。
编程与软件工程上首页 9 次 · 2011–2024aosabook.org编辑精选编程语言简史:简短、不完整且多半错误
A Brief, Incomplete, and Mostly Wrong History of Programming Languages
一篇以戏谑、故意不准确的方式回顾编程语言史的博客文章,用夸张轶事和讽刺定义串起 Lisp、C、C++、Java、JavaScript、PHP 等语言。
编程与软件工程上首页 8 次 · 2009–2021james-iry.blogspot.comSQLite 是如何测试的
How SQLite is tested
SQLite 官方文档页,系统介绍 SQLite 的测试体系:多种测试方法(TCL 测试、模糊测试、回归测试、静态分析等)和海量测试用例,展示了这个小型开源项目如何靠极致测试获得…
编程与软件工程上首页 8 次 · 2009–2025sqlite.org编辑精选高级编程语言(2009)
Advanced programming languages (2009)
Matt Might 的经典文章,按用途推荐“高级编程语言”:如果追求就业就选主流语言,如果追求表达力、学术研究或创业,则推荐 Haskell、OCaml、Scala 等函数式语…
编程与软件工程上首页 8 次 · 2009–2022matt.might.net我的 Forth 与栈机器经历
Yosefk - My history with Forth & stack machines
作者以亲身经历回顾了使用 Forth 语言和栈式机器的历程:既赞叹其简洁优雅、代码量小、可自举的优点,也坦率指出栈操作在实际编程中的痛苦,以及 Forth 社区文化中的问题。
编程与软件工程上首页 8 次 · 2010–2024yosefk.com编辑精选