Skip to content

Errors when downloading gzipped objects in chunks from GCS #1009

Closed

Description

@mziccard

This issue emanates from an issue posted here.

We are trying to get a gzipped GCS file in chunks. The problem comes when we try to read the response content. The problem seems to be related with the fact that response.getContent() automatically creates a GZIPInputStream on top of the raw stream (if the content encoding is gzip). When we attempt to read
the GZIPInputStream given by getContent() we get an error as that stream only holds one chunk of the original file.

Would it be possible to somehow disable the wrapping of the response content into a GzipInputStream when calling getContent()?

Activity

  1. Capstan commented on Jun 16, 2016

    @Capstan

    Or have it notice there's a Content-Range header and disable it itself.

  2. mziccard commented on Sep 30, 2016

    @mziccard
    ContributorAuthor

    Any updates on this?

  3. dalbani commented on Oct 9, 2017

    @dalbani

    Hi, I'm very much new to this GCS library and I'm kind of surprised that this simple use case is not currently supported.
    Well, a workaround has indeed been implemented AFAIK but I still fail to see how to properly handle reading a gzip-compressed blob from a ReadChannel, as in:

    ReadChannel readChannel = storage.reader(blobId);

    How can I then determine that the data coming out this channel is actually encoded (or not) using GZIP?
    Thanks for your help.

  4. added
    priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.
    type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
    on Jan 8, 2018
  5. added
    priority: p2Moderately-important priority. Fix may not be included in next release.
    🚨This issue needs some love.
    and removed
    priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.
    on Jun 7, 2018
  6. ajaaym commented on Jan 24, 2019

    @ajaaym
    Contributor

    @mziccard do you expect the chunks to be of compressed bytes or non compressed bytes?

  7. sduskis commented on Mar 8, 2019

    @sduskis

    I'm going to close this due to staleness. Please open a new issue if this is still a problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

🚨This issue needs some love.priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions