Questions tagged [gzip]

GZip, also known as gzip, refers to a compressed data format as well as various software applications that support this format. If you have any queries about incorporating this library into your program, feel free to use this tag.

Combine, condense, and distribute JavaScript files using Express without applying gzip compression to the response

Currently, I am developing a web application using Express. My goal is to merge, minify, and serve .js files efficiently. To achieve this, I have created a middleware with the following code: var fs = require('fs'), path = require('path ...

Request body is null if accept-encoding is set to 'gzip, deflate'

I'm struggling to capture data from a webhook sent by a third-party source. Despite verifying that the content-length is greater than 0, inspecting req.body only returns {}. The webhook is directed towards the route '/v2/wtevr/report/wtevr'. Here are the ...

Utilizing AngularJS to Extract JSON Data from Gzipped Files Stored Locally via Ajax

Currently, I am attempting to retrieve and read a JSON file that is stored in data.gz using AngularJS's $http service. However, when I make the request, all I get back are strange symbols and characters as the response. My application is being run loc ...

The gzseek function appears to be exceeding the file's size limit

For the past two years, I have been dealing with an odd issue when determining the size of files, especially gz zip compressed files. Despite trying various workarounds, I haven't found an ideal solution. The problem lies in the fact that gzseek() always s ...

Unpacking a GZip Stream retrieved from an HTTPClient's Response

I'm attempting to establish a connection to an API that returns GZip encoded JSON from a WCF service (WCF service to WCF service). Utilizing the HTTPClient, I've managed to retrieve the JSON object as a string. However, my goal is to store this d ...

Issues with using `npm install` on a compressed tarball package

Hello, I am currently attempting to globally install a module that I created using a gzipped tarball. After downloading the source from GitHub and converting it to a tar.gz file, I attempted to install it using the command below: npm install forever.tar.g ...

Reducing file size through compression (gzip) on express js version 4.4.1

My express js app is functioning as a web server, but I am having trouble with serving unzipped static content (js and css files). I have tried using compression from https://github.com/expressjs/compression, but it doesn't seem to be working for me. ...

Dealing with API responses that are compressed with .gzip and contain XML files

I'm currently facing challenges in managing API interactions using node.js (with express and request) due to difficulties handling the data. Below is the snippet of my code: // Requirements const express = require("express"); const bodyParser = require ...

What are some effective measures to defend against a gzip bomb attack on a service

I have a file named test.gzip which contains JSON data. {"events": [ {"uuid":"56c1718c-8eb3-11e9-8157-e4b97a2c93d3", "timestamp":"2019-06-14 14:47:31 +0000", "number":732, "user": {"full_name":"0"*1024*1024*1024}}]} The full_name field in the JSON data c ...

encounter with file compression using gzip

Currently, I am facing an issue with zipping files using jszip because the backend can only unzip gzip files, not zip files. My front end is built using vue.js. let zip = new jszip(); zip.file(fileToCompress.name, fileToCompress); let component = t ...

Skipping decompressing or parsing gzip-encoded JSON POST requests in Rails 4.x

I need to send a large 10-20MB gzipped JSON object to a Rails controller/action without parsing it. All I want to do is save it to the filesystem, in its original format for later unzipping. There was one example I found that tries to decompress and parse ...

What is the process for retrieving the metadata from a file stored within a gzip archive?

Could someone help me with a simple request? I just need to get the modification time of my_text.txt from the compressed file my_archive.gz. https://i.stack.imgur.com/bbOen.png from gzip import GzipFile with GzipFile('my_archive.gz') as gzip_f ...

Encountering issues with Gzip compression in my Spring Boot 1.5.10.RELEASE project

I am currently running on Spring Boot version 1.5.10.RELEASE, but I'm facing issues with Gzip compression not working correctly. When accessing http://localhost:9000, it redirects to http://localhost:8080/api/.. My AngularJS and REST API are on dif ...

Error occurs when attempting to write to a Node stream after it has already

I'm experimenting with streaming to upload and download files. Here is a simple file download route that unzips my compressed file and sends it via stream: app.get('/file', (req, res) => { fs.createReadStream('./upload/compres ...

Gzip is generating inaccurate compression ratios

Having an issue with script to build and gzip. vite build && gzip -9 -r dist && gzip -l -r dist The output from the last command is displayed here gzip -l -r dist compressed uncompressed ratio uncompressed_name ...

What contributes to the superior performance of pickle + gzip compared to h5py when working with repetitive datasets?

I have encountered an issue while saving a numpy array that contains repetitive data: import numpy as np import gzip import cPickle as pkl import h5py a = np.random.randn(100000, 10) b = np.hstack( [a[cnt:a.shape[0]-10+cnt+1] for cnt in range(10)] ) f_p ...

A guide on utilizing zlib and nodejs to effectively compress and decompress a .tar.gz file

While some may consider this question to be simple, I find myself in need of compressing a folder into a .tar.gz file using only Node's zlib library. Equally important, I also need to decompress the .tar.gz file to a specific destination folder - all ...