Questions tagged [gzip]

GZip/gzip is both the name for a compressed data format and any of several software applications implementing this format. Use this tag for questions about implementing the library on your program.

Filter by
Sorted by
Tagged with
0 votes
0 answers
18 views

GZIP very poor compression ratio en COW image files

I was trying to compress some dd image of LVM volumes on which resides a BTRFS filesystem. The source volume is 160 GB and have only 98 GB used on it. Compressing the dd image of the source volume ...
nbanba's user avatar
  • 61
0 votes
1 answer
40 views

Java: Unable to unzip a gzip compressed file?

I am trying to unzip a gzip file content that I have read into memory as a String. /** * Read file content into a String */ private static String readUsingFileInputStream(String ...
HelloWorld's user avatar
0 votes
0 answers
53 views

Is it possible to change permissions, Group, Host OS information of a .tar file via Windows from CMD or Powershell? [closed]

Referencing this Super User article, I have narrowed the scope of what I need to look for. I've produced a .tar.gz file in Windows that contains some files to update firmware via a Linux Device. The ...
k1dfr0std's user avatar
  • 403
0 votes
1 answer
32 views

Reading and Writing special characters in Python

Python ver. 3.11.5 on Windows 10 I have a directory filled with .gz text archives. To scan these archives, I use the following python code: with gzip.open(logDir+"\\"+fileName, mode=&...
Prison Feed's user avatar
1 vote
0 answers
15 views

expressStaticGzip does not compress files

I would like to compress js and css files. I am using the [expressStaticGzip][1] module. As you might have figured out, the response is not being compressed (at all). Neither Brotli nor Gzip is being ...
DoomBot's user avatar
  • 92
0 votes
1 answer
65 views

Fail to decompress Gzip response and GBK encoding using zlib.inflate in Nodejs

I am getting the data which is compressed(Hex data) by Gzip and the text encoding is GBK from the server like this: <Buffer 2d 00 00 00 1f 8b 08 00 00 00 00 00 00 ff 32 34 34 37 32 31 33 32 36 32 ...
TungTung's user avatar
  • 181
0 votes
0 answers
23 views

"gzip" feature problem trying to implement rolling logger in Rust (programmatically) [duplicate]

I've found this page. At the bottom of that page the author says he's giving a programmatic way of configuring so as to have a console logger component but also a rolling file logger component. I'm ...
mike rodent's user avatar
  • 14.3k
-1 votes
1 answer
68 views

How to have constant streamspeed of a GZIP compression?

I try to compress-stream a long running process's output. The process is streaming by a constant speed. The compressed output is at a inconstant speed but I do not know why. Example: import java.io....
Grim's user avatar
  • 1,994
1 vote
1 answer
22 views

After decompres a request in Spring Boot, how can I trigger an endpoint which is waiting JSON data

I need to compress the calls for a WebApp built on Angular/Spring Boot. Angular is compressing the request to the Backend with pako and sending in a Blob (thanks to a previous question in ...
Ana Belén González Villalba's user avatar
0 votes
0 answers
16 views

How to add the GZIPInputStream.GZIP_MAGIC to InputStream [duplicate]

I am having an application in Angular/Spring Boot and I need to compress the body from Angular to Spring Boot. I compress the request in Angular with pako or Zlib on the Client side, and I am reading ...
Ana Belén González Villalba's user avatar
0 votes
0 answers
22 views

How to zgrep a specific key:value from .json.gz file

I have a bunch of logs in multiples .json.gz files. I can easily get a specific string with: zgrep "Search This String" * But now I need to find a specific value inside a key/attribute. I ...
PlayHardGoPro's user avatar
0 votes
0 answers
15 views

How Pako library can gzip a request and send the GZIP_MAGIC that it can identify the request has been compress with gzip

This is application in Angular and Java. Tha angular is compressing the request with pako library, like this : var compressedBody = pako.gzip(JSON.stringify(request.body)) const clone = request....
Ana Belén González Villalba's user avatar
0 votes
0 answers
27 views

How can I decompress request on Spring Boot with Tomcat?

I am working with a Spring Boot application with TomCat embedded and I need to decompres the request that I am receiving in gzip. The request is compress with palo.gzip request and returning a type ...
Ana Belén González Villalba's user avatar
0 votes
0 answers
32 views

How to enable GZIP in compression on static Amazon S3 files using Nuxt 3?

I am working on Nuxt 3 project and I want to use gzip to compress mu chunk size. It should add on response header. I have used this https://nuxt.com/modules/precompress but not working and seems ...
Kishan Bhensadadiya's user avatar
0 votes
0 answers
34 views

Read from a growing compressed file (.gz) in C++

My question is basically same as this one Only in my case the file is a .gz compressed file. Hence I am using boost::iostreams::filtering_istream. Using the approach mentioned in the aforementioned ...
anon's user avatar
  • 15
0 votes
0 answers
18 views

Strawberry Shake error using gzip compression

I am following the official Strawberry Shake guide: https://chillicream.com/docs/strawberryshake/v13/get-started/console Specifically Step 4: Add a GraphQL client to your project using the CLI tools I ...
Baxter's user avatar
  • 5,653
0 votes
1 answer
23 views

spring boot response encoding not working

I've configured my spring boot(2.5.5) application to enable response encoding by providing below properties in application.properties I'm using the default embedded tomcat as a container server....
Krittam Kothari's user avatar
0 votes
1 answer
36 views

Decompress the Gzip json data in .Net Controller

I'm currently trying to decompress the json data that being passed in from the server side in the controller but keep hitting below error. System.IO.InvalidDataException: 'The archive entry was ...
Anis Fatin Nabila Binti Ardhi's user avatar
1 vote
0 answers
32 views

Python requests 2.31.0 with urllib3 >= version 2 not automatically decompressing gzip responses

Been relying on requests' ability to auto-decompress responses for a long time now, as per https://docs.python-requests.org/en/latest/community/faq/#encoded-data However, I'm having a new problem in ...
Jon's user avatar
  • 972
1 vote
3 answers
85 views

Feed unzipped files from all subdirectories into awk

I want awk to process all files in unzipped form from all sub-directories. This is what I've tried: It works only for top level directory files. for file in * do awk -v f="$file" 'NF >...
manish ma's user avatar
  • 1,728
0 votes
1 answer
50 views

How to use gzip in receiving request return and compress in Nodejs

I want to compress the response when using fetch()(the response size is too large and lead to error). In Linux-curl, we can use --compressed. In PHP curl, we can use curl_setopt($ch, CURLOPT_ENCODING, ...
TungTung's user avatar
  • 181
0 votes
1 answer
38 views

Unable to read small compressed byte array from GZIPInputStream

I struggle with a problem and I can't solve it or find a useful answer to it. I have a piece of code that compress an array of bytes : try (final ByteArrayOutputStream byteArrayOutputStream = new ...
Sébastien Vandamme's user avatar
0 votes
0 answers
23 views

How to in PHP is GZIP is enabled?

I need to run some function but only if GZIP is enabled on server (Apache or LiteSpeed). How can I detect this? I've tried: if(ini_get("zlib.output_compression")) { echo "On"; }...
D_P's user avatar
  • 85
0 votes
0 answers
11 views

How to detect is GZIP is enabled by PHP?

I have created PHP script for GZIP compression settings added to .htaccess file: // Ścieżka do pliku .htaccess $htaccess_path = ABSPATH . '.htaccess'; // Sprawdź, czy plik .htaccess istnieje i jest ...
D_P's user avatar
  • 85
1 vote
1 answer
36 views

403 Forbidden Error when Downloading XML.GZ File using Polite Package in R

I am trying to download a file from a URL using the polite package in R. Here is the code I am using: library(polite) # URL of the file to download eprice_xml_products_1 <- "https://www....
Andrea's user avatar
  • 115
0 votes
2 answers
44 views

How to estimate the extracted size of a tar.gz file without extracting it in PowerShell 7 (Windows 11)?

I have a tar.gz file that is about 1.39GB. I want to estimate the unzipped size before I actually extract it to avoid filling up my disk. This is for my work and I can only use my work PC (Windows 11) ...
Yee's user avatar
  • 13
1 vote
1 answer
29 views

How to create a gzip file without actually compressing the file

I have several tools that expects a gzip file but a file that is created not gzipped, i'd like these tools to access the regular file without actually compressing it (this takes too much time and will ...
Binyamin's user avatar
  • 450
0 votes
0 answers
25 views

Decompressing gzip content-encoding using Python3

I am making a call to a client's data store which returns the following response: {'error_code': 0, 'message': 'Success', 'request_id': '409d2f00c02fb8a069c97cfe5f6992c1', 'data': 'bL//4HZ29tk+...
HamishCrichton's user avatar
0 votes
0 answers
24 views

For a huge txt.gz file, how could I decompress from line#n to line#m or one line each time. (python)

About a log file txt.gz which is too big(2-8 GB) to uzip it, I want to decompress it line by line on python, is there any way to do it? (like file.readline(0)) Currently using the gz.open, do not have ...
Edward J.'s user avatar
0 votes
1 answer
76 views

Trying to download a .gz file using NodeJS/Typescript and the file downloads as 'either in unknown format or damaged'

So I'm writing a service where I have to download some .gz file, exctract the .xml file inside, get the data I need and delete them. However, when I try to download using the code below I'm getting ...
Yarden's user avatar
  • 15
0 votes
1 answer
58 views

React Native or Swift gzip unpack to Documents directory on iOS

I have a React Native app that needs to decompress a gzip file so that it can access the individual files that are inside the gzip file. Exactly like how it works when you tap on the file in the iOS ...
mutable2112's user avatar
0 votes
0 answers
29 views

Apache: How to decompress pre-compressed HTML using mod_deflate? (INFLATE not working as documented)

I am working on a statically generated html site, that is bundled into a container image. To reduce the overall size of the container image, we pre-compress all HTML files, and to simplify our Apache ...
Jared Sprague's user avatar
0 votes
1 answer
32 views

Trying to import a .gz file and encountering errors

I am downloading the data from the following site (https://www.dol.gov/agencies/eta/performance/results). from here, I scroll down to PY 2022, Q2 and click on WIOA Indvidual Performance Records and ...
Tim Wilcox's user avatar
  • 1,279
-2 votes
1 answer
48 views

In ansible version 2.9.25 - how to tar, compress (gzip) the directory in Linux and copy to destination path [closed]

In ansible version 2.9.25 - how to create tar file of given dir and also compress (gzip) that dir in Linux (RHEL 7.9) to the given destination path directly. During Oracle DB patching as pre-check ...
Learner's user avatar
  • 13
2 votes
1 answer
106 views

How to open parquet files in a gzip format in a zip archive as a pandas dataframe in python without first extracting it?

I have a series of zip files containing parquet files that are in a gzip format. I am trying to open the parquet files in pandas without extracting the whole archive first. From the python zipfile ...
MrKingsley's user avatar
0 votes
0 answers
110 views

zlib.error: Error -3 while decompressing data: invalid block type while decompressing .gzip with python

I am trying to decompress .gzip file into .xlsx with NumPy. I am using Python3.10.9, Numpy 1.23.5, and running the lines on VS Code. My system is Win64. However, I got these error code. I'm not sure ...
Hartley's user avatar
2 votes
1 answer
83 views

Convert file to Gzip memory stream, then convert that to Base64 before exporting to text file (or var)

How do I change the below so i can use the Gzip data with [System.Convert]::ToBase64String() instead of an outfile then send THAT output(the b64) to an outfile **I Received these answers from help on ...
PlayLORD-SysOp's user avatar
4 votes
1 answer
94 views

Add compression to B64 conversion for powershell. The conversion works fine I'm not sure how to approach adding gzip or similar compression

I can convert files to B64 then back again, i would like to compress the data before converting to B64. Gzip doesnt have to be used, any type of compression or size reduction is fine, I think ...
PlayLORD-SysOp's user avatar
0 votes
1 answer
36 views

Failing GZIPInputStream

My Java app writes out a gzip compressed object to a file using try-with resources statement. The object is a very basic with a couple of primitive fields and an ArrayList of Integers. It has no ...
Obsyd's user avatar
  • 3
1 vote
1 answer
52 views

Go bufio.Writer, gzip.Writer and upload to AWS S3 in memory

I am attempting to write a compressed file from memory and upload to S3. I am serializing a large array of type Data struct into a bufio.Writer that writes to a gzip.Writer in a line-by-line fashion: #...
t.ry's user avatar
  • 97
0 votes
0 answers
81 views

Powershell Invoke-RestMethod Error Invoke-RestMethod : The magic number in GZip header is not correct. Make sure you are passing in a GZip stream

Trying to query API. Works fine in postman. When I try to run in Powershell, I get error: Invoke-RestMethod : The magic number in GZip header is not correct. Make sure you are passing in a GZip ...
user3232808's user avatar
0 votes
1 answer
45 views

Illegal character in wildfly with GZIP Encoding

I have a client that sends a request to a REST webservice using Encoding: gzip. This triggers an exception in Wildfly: org.jboss.resteasy.spi.ReaderException: com.fasterxml.jackson.core....
assylias's user avatar
  • 322k
1 vote
2 answers
96 views

Gzip decompress throws EOFException

I am currently trying to decompress a byte array by using gzip decompress, however, I receive an EOFException, can anyone help me with this error ? Thanks this is my codes: import java.io....
hahahaflying's user avatar
0 votes
0 answers
15 views

How to use gzip_static and a reverse proxy caching setup simultaneously for dynamically generated content?

I am confused by https://docs.nginx.com/nginx/admin-guide/web-server/compression/#sending-compressed-files which reads: Note that the gzip_static directive does not enable on-the-fly compression. It ...
johnnyApplePRNG's user avatar
0 votes
0 answers
51 views

Download .gz zipped .nc file from URL

I am trying to download the Hadley Met Office sea ice dataset from their website. The data is stored in a .nc format and has also been compressed in the .gz format. I've tried the following, and I ...
tnt's user avatar
  • 1,183
0 votes
1 answer
57 views

How to get the size of gzip compressed response in .NET Core 6.0

I have an ASP.NET Core 6 Web API solution. I have added a gzip compression middleware to compress the API response, now I want to check the size of compressed response. How I can check the gzip ...
ABHIJEET SINGH's user avatar
1 vote
2 answers
113 views

Parse Large Gzip File and Manipulate Data with Limited Memory

Use Case: Given a ~2GB .gz file with newline delimited json, manipulate each line and write output to zip file (csv) Issue: The environment I am working with has ~1GB of memory and I do not have ...
Joe's user avatar
  • 2,661
0 votes
0 answers
54 views

Gzipper with angular 15 for reducing size of js files

I'm using the gzipped utility to reduce the size of the main.js file with angular 15. However, I am not able to reduce the size of main.js as well as other js files for production. Following is the ...
Danish 's user avatar
0 votes
0 answers
15 views

Do I need to manually compress AJAX POST from the browser in JS when working over HTTPS, or is it done automatically?

For example, every minute I send JSON (20 Kb) to the server, which writes to the database. If I manually compress this data in JS via LZW and send it as binary data, then their size will be only 5 KB. ...
DMA's user avatar
  • 1
0 votes
0 answers
28 views

Nginx with GZIP not compressing Django responses even when it is enabled

I have a Django project that runs via Nginx web server. I've enabled gzip settings on nginx.conf like this: gzip on; gzip_vary on; gzip_proxied any; gzip_comp_level 6; gzip_buffers 16 8k; ...
Mr.D's user avatar
  • 7,393

1
2 3 4 5
122