zlib: use `.bytesWritten` instead of `.bytesRead`
The introduction of .bytesRead
to zlib streams was unfortunate,
because other streams in Node.js core use the exact opposite naming
of .bytesRead
and .bytesWritten
.
While one could see how the original naming makes sense in
a Transform
stream context, we should try to work towards more
consistent APIs in core for these things.
This introduces zlib.bytesWritten
and documentation-only deprecates
zlib.bytesRead
.
(Luckily, the old property name hasn’t even been around for a whole year yet.)
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
documentation is changed or added -
commit message follows commit guidelines