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

  • Home
  • SEARCH
  • 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 8931081
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T09:01:49+00:00 2026-06-15T09:01:49+00:00

Hi I am new to blackberry 10 platform. I am developing an application to

  • 0

Hi I am new to blackberry 10 platform. I am developing an application to unzip files compressed using GZip. I am looking for extracting folder that compressed with GZip.

  • 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-15T09:01:50+00:00Added an answer on June 15, 2026 at 9:01 am

    I have the same problem and I solved this problem by adding the following method

    gUncompress(const QByteArray &data)
    {
        qDebug()<<"Reached Guncompress";
        qDebug()<<"size="<<data.size();
        if (data.size() <= 4) {
            qWarning("gUncompress: Input data is truncated");
            return QByteArray();
        }
    
        QByteArray result;
    
        int ret;
        z_stream strm;
        static const int CHUNK_SIZE = 1024;
        char out[CHUNK_SIZE];
    
        /* allocate inflate state */
        strm.zalloc = Z_NULL;
        strm.zfree = Z_NULL;
        strm.opaque = Z_NULL;
        strm.avail_in = data.size();
        strm.next_in = (Bytef*)(data.data());
    
        ret = inflateInit2(&strm, 15 +  32); // gzip decoding
        if (ret != Z_OK)
            return QByteArray();
    
        // run inflate()
        do {
            strm.avail_out = CHUNK_SIZE;
            strm.next_out = (Bytef*)(out);
    
            ret = inflate(&strm, Z_NO_FLUSH);
            Q_ASSERT(ret != Z_STREAM_ERROR);  // state not clobbered
    
            switch (ret) {
            case Z_NEED_DICT:
                ret = Z_DATA_ERROR;     // and fall through
            case Z_DATA_ERROR:
            case Z_MEM_ERROR:
                (void)inflateEnd(&strm);
                return QByteArray();
            }
    
            result.append(out, CHUNK_SIZE - strm.avail_out);
        } while (strm.avail_out == 0);
    
        // clean up and return
        inflateEnd(&strm);
        return result;
    }
    

    I think this will solve your problem

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

Sidebar

Related Questions

I am new in blackberry, i am developing one blackberry application in which i
Please tell me will BlackBerry application till OS 7.1 work for new BlackBerry OS
I'm new to Blackberry application development and I need a piece of advise. I
Hello everyone I am new to blackberry and I want a textfield that scroll
Greetings , I am a new developer in BlackBerry Application. I have been working
New to Android before I port my application to this platform I wanted to
I'm new to Blackberry. I use phonegap to create cross platform applications. I'm trying
I am new to Blackberry developement.I want do the custom textfield in my application.
i am new to Blackberry application development. now i am trying to make new
I am creating my very first blackberry application that tries to connect to a

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.