• Return the total byte length of the given data chunks. The total byte length is the value required for the Content-Length HTTP header.

    Parameters

    • dataChunks: (string | Buffer)[]

      The data chunks to find the total byte length of.

    • encoding: null | BufferEncoding

      The encoding for computing the byte length of any string data chunks, can be null if all the chunks are Buffers.

    Returns number

    The total byte length of all the data chunks.