# node-compress **Repository Path**: mirrors_mikeal/node-compress ## Basic Information - **Project Name**: node-compress - **Description**: A streaming compression / gzip library for node.js - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-08-09 - **Last Updated**: 2025-09-20 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README node-compress ============= A streaming compression / gzip module for node.js To install, ensure that you have libz installed, and run: node-waf configure node-waf build This will put the compress.node binary module in build/default. Quick example ------------- var compress=require("./compress"); var sys=require("sys"); var fs=require("fs"); // Create gzip stream var gzip=new compress.Gzip; gzip.init(); // Pump data to be compressed var gzdata1 = gzip.deflate("My data that needs ", "binary"); sys.puts("Compressed size : "+gzdata1.length); var gzdata2 = gzip.deflate("to be compressed. 01234567890.", "binary"); sys.puts("Compressed size : "+gzdata2.length); var gzdata3 = gzip.end(); sys.puts("Last bit : "+gzdata3.length); // Normally stream this out as its generated, but just print here var gzdata = gzdata1+gzdata2+gzdata3; sys.puts("Total compressed size : "+gzdata.length);