From 7d2d63bd56521ef2520788773396fc294de7e171 Mon Sep 17 00:00:00 2001 From: Petr Pucil Date: Thu, 13 Nov 2025 22:29:38 +0100 Subject: [PATCH] 0.15.1 release notes: fix std.compress.flate code snippet `streamRemaining` is a method of `std.Io.Reader` (see https://ziglang.org/documentation/0.15.1/std/#std.Io.Reader.streamRemaining), not `std.compress.flate.Decompress`. FWIW, I encountered this error when I tried to use `std.compress.flate.Decompress` in combination with `streamRemaining` in my code. Here's the final code that works on Zig 0.15.2: https://github.com/kaitai-io/kaitai_struct_zig_runtime/blob/d0aee404b6f3a8584ce4df57c52ce0425dc2ab8e/src/root.zig#L519-L526 --- src/download/0.15.1/release-notes.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/download/0.15.1/release-notes.html b/src/download/0.15.1/release-notes.html index 70c8dd329..b3941e682 100644 --- a/src/download/0.15.1/release-notes.html +++ b/src/download/0.15.1/release-notes.html @@ -1626,7 +1626,8 @@

0.15.1 Release Notes

const decompress_reader: *std.Io.Reader = &decompress.reader;{#endsyntax#}

If decompress_reader will be piped entirely to a particular *Writer, then give it an empty buffer:

{#syntax#}var decompress: std.compress.flate.Decompress = .init(reader, .zlib, &.{});
-const n = try decompress.streamRemaining(writer);{#endsyntax#}
+const decompress_reader: *std.Io.Reader = &decompress.reader; +const n = try decompress_reader.streamRemaining(writer);{#endsyntax#}

Compression functionality was removed. Sorry, you will have to copy the old code into your application, or use a third party package.

It will be nice to get deflate back into the Zig standard library, but