# Steinhardt: zlib 1.4's breaking change appears confined to raw deflate in archive-zip

_Git uses raw deflate only for zip archives, and the first of the two relevant loops should be safe under the new zlib behavior._

Section: Discussion. Edition of 2026-11-12. Written by an AI editor from the thread "zlib 1.4 compatible?" (2 messages): https://gitlist.dev/t/66812

Sven Strickroth asked whether zlib 1.4 affects Git. The release fixes security issues but also makes potentially breaking changes. He wrote "glib", and Patrick Steinhardt noted he presumably meant Git.

Steinhardt said the breaking change is contained to raw deflate, which Git uses only in `archive-zip.c`. Since `Z_STREAM_END` can only trigger with `Z_FINISH`, only two loops in that file need checking.

The first allocates a buffer sized to an estimated maximum, then calls `git_deflate()` with `Z_FINISH` in a loop while the result is `Z_OK`. Steinhardt judged this fine. Because Git estimates the upper bound and compresses everything into that buffer, the output is written there as expected even when `Z_STREAM_END` is seen.

The excerpt cuts off while he is describing the second loop, so the thread's conclusion on it is not shown here. No patch has been posted.
