quantaloom
v1.0.5
Published
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
Downloads
14
Maintainers
Readme
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:
Import the quantaloom into your file:
const quantaLoom = require('quantaloom');
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
- [email protected]
💫 Feel free to email for any kind of support or query