Quin wanted the Paperback reader to open old Windows help files. Manfred Winterhoff’s format notes and decompiler provided a map, and real .hlp files showed where the new Rust reader still got the details wrong.

  • A help file is an archive. Its directory points to separate streams for text, fonts, links, and images. Text offsets refer to decompressed blocks, which reserve more address space than they usually fill.
  • Old readers define some of the rules. Some files copy bytes from before the start of the decompressed data. Winterhoff’s reader initializes its sliding window with zeros, so Quin’s reader does too.
  • An empty field still matters. One version of the phrase table permits a length field with zero remainder bits. Reading even one bit there throws off every following phrase length.

When writing a reader for a legacy format, keep real files alongside your hand-built tests. A sample with a zero-width field or an old compression quirk can pin down behavior that a typical file never exercises.