Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8455629
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T12:19:58+00:00 2026-06-10T12:19:58+00:00

I am trying to read a gz file from a webserver through a python

  • 0

I am trying to read a gz file from a webserver through a python script. The size of the source file is 60Mb or more. I dont want to wait for the whole file to be read to decompress and read the contents. Rather I want to decompress information as and when I receive a few bytes.
I tried doing that, but I get turned off by errors like “CRC check failed “. I am using gzip module , as the server returns the content-encoding as “gzip”. I have also tried my luck with zlib, but no fruit.
I have seen Mozilla Firefox or Google Chrome doing the above without any issues . I watched the HTTP headers , and I see that the content is not received all at once, but the browser is able to show decompressed partial data as and when it receives it. How do they do it ? Any help is appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T12:19:59+00:00Added an answer on June 10, 2026 at 12:19 pm

    use zlib.decompressobj with the wbits parameter 31. Then deobj.decompress() will allow you to decompress gzip input a piece at a time.

    The 31 does not mean 31 bits. It is really 15 + 16, where 15 represents the maximum size of the sliding window of 2^15 bytes, and the 16 is an option to request gzip format decoding. Without adding 16, the zlib format will be decoded, which will reject gzip input.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to read xml file from vbs script. Xml is encoded in utf-8
I'm trying to read a file from a local filesystem. I do not have
I have one .net windows application I'm trying to read .xml file from c#
I am trying to read from file: The file is multiline and basically i
I am trying to read a text file from raw folder, and it works
I am trying to read a wav file from the resources of my Java
I am trying to read a binary file from a program that writes a
I'm trying to read a txt file from a ftp server and I'm getting
Hi I am trying to read in a .json file from my local machine.
I have an xml file(from federal government's data.gov) which I'm trying to read with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.