diff --git a/doc/api/deprecations.md b/doc/api/deprecations.md index ba9580a7f5cca5..6fd8d1d4f5ec81 100644 --- a/doc/api/deprecations.md +++ b/doc/api/deprecations.md @@ -979,6 +979,16 @@ Type: Runtime This was an undocumented helper function not intended for use outside Node.js core and obsoleted by the removal of NPN (Next Protocol Negotiation) support. + +### DEP0108: zlib.bytesRead + +Type: Documentation-only + +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. + [`--pending-deprecation`]: cli.html#cli_pending_deprecation [`Buffer.allocUnsafeSlow(size)`]: buffer.html#buffer_class_method_buffer_allocunsafeslow_size [`Buffer.from(array)`]: buffer.html#buffer_class_method_buffer_from_array @@ -1058,6 +1068,7 @@ core and obsoleted by the removal of NPN (Next Protocol Negotiation) support. [`util.types`]: util.html#util_util_types [`util`]: util.html [`worker.exitedAfterDisconnect`]: cluster.html#cluster_worker_exitedafterdisconnect +[`zlib.bytesWritten`]: zlib.html#zlib_zlib_byteswritten [alloc]: buffer.html#buffer_class_method_buffer_alloc_size_fill_encoding [alloc_unsafe_size]: buffer.html#buffer_class_method_buffer_allocunsafe_size [from_arraybuffer]: buffer.html#buffer_class_method_buffer_from_arraybuffer_byteoffset_length diff --git a/doc/api/zlib.md b/doc/api/zlib.md index 4a9103a9793754..0a554b40afeb5d 100644 --- a/doc/api/zlib.md +++ b/doc/api/zlib.md @@ -400,13 +400,28 @@ class of the compressor/decompressor classes. ### zlib.bytesRead +> Stability: 0 - Deprecated: Use [`zlib.bytesWritten`][] instead. + * {number} -The `zlib.bytesRead` property specifies the number of bytes read by the engine -before the bytes are processed (compressed or decompressed, as appropriate for -the derived class). +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 + + +* {number} + +The `zlib.bytesWritten` property specifies the number of bytes written to +the engine, before the bytes are processed (compressed or decompressed, +as appropriate for the derived class). ### zlib.close([callback])