Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to read the .gz files
Forum Updated to NodeBB v4.3 + New Features

How to read the .gz files

Scheduled Pinned Locked Moved General and Desktop
10 Posts 6 Posters 8.4k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mahesh
    wrote on last edited by
    #1

    hi ,some one please tell me how to open and read information in that file...please help me

    1 Reply Last reply
    0
    • R Offline
      R Offline
      Rahul Das
      wrote on last edited by
      #2

      Use 7zip manager or if u are on linux ,see tar man pages.

      How does the extraction of a file related to Qt ?


      Declaration of (Platform) independence.

      1 Reply Last reply
      0
      • M Offline
        M Offline
        mahesh
        wrote on last edited by
        #3

        no i am working in unix...i want to read the zip file..

        1 Reply Last reply
        0
        • R Offline
          R Offline
          Rahul Das
          wrote on last edited by
          #4

          @$ gunzip file.gz
          $ gzip -d file.gz @

          Or may be ,you want to do some file operations with [[doc: QFile]]

          What exactly are you trying to do with the file ? {If its just a unix issue , or zip issue, this is not the ideal forum to ask}


          Declaration of (Platform) independence.

          1 Reply Last reply
          0
          • S Offline
            S Offline
            Seba84
            wrote on last edited by
            #5

            [quote author="phani438" date="1324827256"]no i am working in unix...i want to read the zip file.. [/quote]

            Hello phani438,

            Can you explain your problem a bit better?
            Is this a Qt-related question?

            Bye!

            1 Reply Last reply
            0
            • G Offline
              G Offline
              goetz
              wrote on last edited by
              #6

              [quote author="phani438" date="1324827256"]no i am working in unix...i want to read the zip file.. [/quote]

              • on the command line?
              • using QFile?
              • using standard C++ iostreams?
              • using standard C file handles?

              http://www.catb.org/~esr/faqs/smart-questions.html

              1 Reply Last reply
              0
              • M Offline
                M Offline
                mahesh
                wrote on last edited by
                #7

                i want to read the the zip file using Qfile...i have a file name mtbi.gz..i want to read the information using Qfile...

                1 Reply Last reply
                0
                • G Offline
                  G Offline
                  goetz
                  wrote on last edited by
                  #8

                  There is no Qt builtin way to read gzip compressed files with an QIODevice. You will have to resort either to call an external program or to incorporate "zlib":http://zlib.net/ into your program. For the former, you may call "gunizp -c" plus the path to your file via [[Doc:QProcess]] and read from the standard output of the process.

                  http://www.catb.org/~esr/faqs/smart-questions.html

                  1 Reply Last reply
                  0
                  • T Offline
                    T Offline
                    tucnak
                    wrote on last edited by
                    #9

                    Way: locale unzipper in src/ directory. Build it. Now you can do it like that:
                    @
                    //.....
                    shell = new QProcess(this);
                    QStringList argv() << myfile.fileName();
                    shell.start("./src/unzip",argv); // or in win32 - src/unzip.exe
                    //.....
                    @
                    And you have to create some signal-slot connections. But at first read about QProcess and gzip

                    1 Reply Last reply
                    0
                    • A Offline
                      A Offline
                      andre
                      wrote on last edited by
                      #10

                      This is a FAQ. There is an entry on it "here":http://developer.qt.nokia.com/faq/answer/how_to_compress_data_with_qt .

                      1 Reply Last reply
                      0

                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Search
                      • Get Qt Extensions
                      • Unsolved