Skip to content

doc: zlib createGzip doesn't provide an example of usage. #28073

Description

@RamirezAlex

I noticed that the documentation zlib.createGzip() doesn't have an example of how to use it and it would be nice to have one example like many others on the Node.js docs.
https://nodejs.org/api/zlib.html#zlib_class_zlib_gzip

I am willing to help to provide examples for the zlib documentation.

Activity

  1. Trott commented on Jun 12, 2019

    @Trott
    Member

    The very first example in the doc uses it.

    const gzip = zlib.createGzip();
    const fs = require('fs');
    const inp = fs.createReadStream('input.txt');
    const out = fs.createWriteStream('input.txt.gz');
    
    inp.pipe(gzip).pipe(out);

    That's not necessarily a reason to not include an example where the function is described. (But maybe it is?)

  2. RamirezAlex commented on Nov 19, 2019

    @RamirezAlex
    ContributorAuthor

    This was already addressed here:
    #28136

    Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions