From c48904a8e36d7c99cdcaad9046fb15685b17ded9 Mon Sep 17 00:00:00 2001 From: Yagiz Nizipli Date: Thu, 19 Sep 2024 16:00:12 -0400 Subject: [PATCH 1/2] zlib: remove `zlib.bytesRead` Use `zlib.bytesWritten` instead. --- doc/api/deprecations.md | 5 +- doc/api/zlib.md | 16 ---- lib/zlib.js | 21 ------ test/parallel/test-zlib-bytes-read.js | 102 -------------------------- 4 files changed, 4 insertions(+), 140 deletions(-) delete mode 100644 test/parallel/test-zlib-bytes-read.js diff --git a/doc/api/deprecations.md b/doc/api/deprecations.md index 45fa6733cc8971..2f0394d4a2deb8 100644 --- a/doc/api/deprecations.md +++ b/doc/api/deprecations.md @@ -2290,6 +2290,9 @@ core and obsoleted by the removal of NPN (Next Protocol Negotiation) support. -Type: Runtime +Type: End-of-Life Deprecated alias for [`zlib.bytesWritten`][]. This original name was chosen because it also made sense to interpret the value as the number of bytes diff --git a/doc/api/zlib.md b/doc/api/zlib.md index b54fcbaeefe5c2..e18a8bda827239 100644 --- a/doc/api/zlib.md +++ b/doc/api/zlib.md @@ -684,22 +684,6 @@ base class of the compressor/decompressor classes. This class inherits from [`stream.Transform`][], allowing `node:zlib` objects to be used in pipes and similar stream operations. -### `zlib.bytesRead` - - - -> Stability: 0 - Deprecated: Use [`zlib.bytesWritten`][] instead. - -* {number} - -Deprecated alias for [`zlib.bytesWritten`][]. This original name was chosen -because it also made sense to interpret the value as the number of bytes -read by the engine, but is inconsistent with other streams in Node.js that -expose values under these names. - ### `zlib.bytesWritten`