1.0.5 ā€¢ Published 5 months ago

quantaloom v1.0.5

Weekly downloads
-
License
MIT
Repository
-
Last release
5 months ago

QuantaLoom šŸ’«

QuantaLoom Middleware: QuantaLoom emerges as an innovative standard for server optimization, functioning as specialized middleware within Node.js applications. Proficient in its capabilities, QuantaLoom dynamically weaves compression into server responses, skillfully reducing data sizes before dispatching to clients.

QuantaLoom is a compression middleware for Node.js web servers that enables content compression for efficient data transmission over HTTP(s).

Table of Contents

Introduction

The QuantaLoom Compression Middleware provides a streamlined approach to compressing HTTP responses using Gzip or Deflate algorithms based on client request Accept-Encoding headers. This middleware offers easy integration into your Node.js applications, reducing data transfer sizes and improving performance

Installation šŸ˜±

To install QuantaLoom, use npm/yarn:

  npm install quantaloom
  yarn add quantaloom

Usage šŸ’šŸ»

To use QuantaLoom in your Node.js application, follow these steps:

  1. Import the quantaloom into your file:

    const quantaLoom = require('quantaloom');
  2. Apply the QuantaLoom middleware to your Express application:

    const express = require('express');
    const app = express();
    const quantaLoom = require('quantaloom');
    
    // Apply QuantaLoom middleware
    app.use(quantaLoom());
    
    // ...other middleware and routes...
    
    app.listen(3000, () => {
     console.log('Server is running on port 3000');
    });

API šŸ¤žšŸ»

quantaLoom(options): The quantaLoom function initializes the compression middleware. It takes an optional options object with the following properties:

threshold: (Optional) Minimum response size for compression (default: 1024 bytes). Example usage with threshold:

 const compressionOptions = {
   threshold: 2048
 };

 app.use(quantaLoom(compressionOptions));

quantaLoom.filter: The filter property provides access to additional functionality for filtering and handling compression settings.

Contributing

Contributions and issues are welcome! šŸ’•

Feel free to fork the repository, make changes, and submit pull requests. Repository URL will be attach soon

License

This project is licensed under the MIT License.

Author šŸ˜Ž

  • Satyam Raghu
  • Satyamraghu90@gmail.com

šŸ’« Feel free to email for any kind of support or query