From e225f000343fad84f449e26eec916d8743a0d5f0 Mon Sep 17 00:00:00 2001 From: Yagiz Nizipli Date: Sat, 28 Sep 2024 19:46:21 -0400 Subject: [PATCH] zlib: remove `zlib.bytesRead` Use `zlib.bytesWritten` instead. PR-URL: https://github.com/nodejs/node/pull/55020 Reviewed-By: Benjamin Gruenbaum Reviewed-By: Matteo Collina Reviewed-By: James M Snell Reviewed-By: Antoine du Hamel --- doc/api/deprecations.md | 5 +- doc/api/zlib.md | 17 ----- lib/zlib.js | 21 ------ test/parallel/test-zlib-bytes-read.js | 102 -------------------------- 4 files changed, 4 insertions(+), 141 deletions(-) delete mode 100644 test/parallel/test-zlib-bytes-read.js diff --git a/doc/api/deprecations.md b/doc/api/deprecations.md index 45fa6733cc8..2f0394d4a2d 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 b54fcbaeefe..36977eae86a 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`