VOOZH about

URL: https://www.geeksforgeeks.org/node-js/node-js-zlib-byteswritten-property/

⇱ Node.js zlib.bytesWritten Property - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Node.js zlib.bytesWritten Property

Last Updated : 28 Apr, 2025

The zlib.bytesWritten property is an application programming interface of the zlib module which is used to specify the number of bytes written to the engine before the bytes are processed (compressed or decompressed, as proper for the derived class).

Syntax:

zlib.bytesWritten

Return Value: It returns the number of bytes written to the engine. 

The below examples illustrate the use of zlib.bytesWritten method in Node.js:

Example 1: 

Output:

21

Example 2: 

Output:

16

Reference: https://nodejs.org/api/zlib.html#zlib_zlib_byteswritten

Comment

Explore