GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — zlib: remove `zlib.bytesRead` · nodejs/node@e225f00

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • doc/api
    • deprecations.md
    • zlib.md
  • lib
    • zlib.js
  • test/parallel
    • test-zlib-bytes-read.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎doc/api/deprecations.md‎

Copy file name to clipboardExpand all lines: doc/api/deprecations.md
+4-1Lines changed: 4 additions & 1 deletion
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -2290,6 +2290,9 @@ core and obsoleted by the removal of NPN (Next Protocol Negotiation) support.
22902290

22912291
<!-- YAML
22922292
changes:
2293+
- version: REPLACEME
2294+
pr-url: https://github.com/nodejs/node/pull/55020
2295+
description: End-of-Life.
22932296
- version: v11.0.0
22942297
pr-url: https://github.com/nodejs/node/pull/23308
22952298
description: Runtime deprecation.
@@ -2298,7 +2301,7 @@ changes:
22982301
description: Documentation-only deprecation.
22992302
-->
23002303

2301-
Type: Runtime
2304+
Type: End-of-Life
23022305

23032306
Deprecated alias for [`zlib.bytesWritten`][]. This original name was chosen
23042307
because it also made sense to interpret the value as the number of bytes
Collapse file

‎doc/api/zlib.md‎

Copy file name to clipboardExpand all lines: doc/api/zlib.md
-17Lines changed: 0 additions & 17 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -684,22 +684,6 @@ base class of the compressor/decompressor classes.
684684
This class inherits from [`stream.Transform`][], allowing `node:zlib` objects to
685685
be used in pipes and similar stream operations.
686686

687-
### `zlib.bytesRead`
688-
689-
<!-- YAML
690-
added: v8.1.0
691-
deprecated: v10.0.0
692-
-->
693-
694-
> Stability: 0 - Deprecated: Use [`zlib.bytesWritten`][] instead.
695-
696-
* {number}
697-
698-
Deprecated alias for [`zlib.bytesWritten`][]. This original name was chosen
699-
because it also made sense to interpret the value as the number of bytes
700-
read by the engine, but is inconsistent with other streams in Node.js that
701-
expose values under these names.
702-
703687
### `zlib.bytesWritten`
704688

705689
<!-- YAML
@@ -1307,7 +1291,6 @@ Decompress a chunk of data with [`Unzip`][].
13071291
[`buffer.kMaxLength`]: buffer.md#bufferkmaxlength
13081292
[`deflateInit2` and `inflateInit2`]: https://zlib.net/manual.html#Advanced
13091293
[`stream.Transform`]: stream.md#class-streamtransform
1310-
[`zlib.bytesWritten`]: #zlibbyteswritten
13111294
[convenience methods]: #convenience-methods
13121295
[zlib documentation]: https://zlib.net/manual.html#Constants
13131296
[zlib.createGzip example]: #zlib
Collapse file

‎lib/zlib.js‎

Copy file name to clipboardExpand all lines: lib/zlib.js
-21Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,6 @@ const {
4646
genericNodeError,
4747
} = require('internal/errors');
4848
const { Transform, finished } = require('stream');
49-
const {
50-
deprecate,
51-
} = require('internal/util');
5249
const {
5350
isArrayBufferView,
5451
isAnyArrayBuffer,
@@ -271,24 +268,6 @@ ObjectDefineProperty(ZlibBase.prototype, '_closed', {
271268
},
272269
});
273270

274-
// `bytesRead` made sense as a name when looking from the zlib engine's
275-
// perspective, but it is inconsistent with all other streams exposed by Node.js
276-
// that have this concept, where it stands for the number of bytes read
277-
// *from* the stream (that is, net.Socket/tls.Socket & file system streams).
278-
ObjectDefineProperty(ZlibBase.prototype, 'bytesRead', {
279-
__proto__: null,
280-
configurable: true,
281-
enumerable: true,
282-
get: deprecate(function() {
283-
return this.bytesWritten;
284-
}, 'zlib.bytesRead is deprecated and will change its meaning in the ' +
285-
'future. Use zlib.bytesWritten instead.', 'DEP0108'),
286-
set: deprecate(function(value) {
287-
this.bytesWritten = value;
288-
}, 'Setting zlib.bytesRead is deprecated. ' +
289-
'This feature will be removed in the future.', 'DEP0108'),
290-
});
291-
292271
/**
293272
* @this ZlibBase
294273
* @returns {void}
Collapse file

‎test/parallel/test-zlib-bytes-read.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-zlib-bytes-read.js
-102Lines changed: 0 additions & 102 deletions
This file was deleted.

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.