Login
You're viewing the code4lib.social public feed.
  • Nov 30, 2026, 6:47 PM

    Then there's the Lempel-Ziv compression!

    This includes 2 variants of a routine to locate the longest match from a hashmap, possibly a microoptimized LZ-pass favoring how long it takes over how few bytes it outputs, some serialization utils for outputting LZ-results, & a normal implementation maintaing a ringbuffer & consulting (with shortcuts) the lookup routine to which backrefs or literals it should output, & a routine to output remaining text from the buffer.

    4/5!

    💬 1🔄 1⭐ 0

Replies

  • Nov 30, 2026, 6:54 PM

    There's an abstraction around all of these routines which further prepares data & propagates any failures, & another wrapper around that.

    There's an initializer, getters, & a wrapper to avoid to instantiate the object yourself. There's further wrappers outputting to different targets.

    Miniz has its own rudimentary PNG serializer. There's cross-platform wrappers around UNIX filesystem APIs. There's various magic numbers & structs. There's array helpers.

    5/5.2!

    💬 1🔄 1⭐ 0
  • Nov 30, 2026, 6:57 PM

    And there's a Zip (de)serializer, & lookup routines. I don't think I'll study this in detail, I'll have another to study soon-ish!

    5.2/5.2 Fin for today! Tomorrow: ePub!

    💬 0🔄 1⭐ 0