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. Quazip functions
QtWS25 Last Chance

Quazip functions

Scheduled Pinned Locked Moved General and Desktop
17 Posts 4 Posters 7.9k Views
  • 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.
  • K Offline
    K Offline
    kitten
    wrote on last edited by
    #4

    yes it is a different question

    www.kitten.mihanblog.com

    1 Reply Last reply
    0
    • V Offline
      V Offline
      vsorokin
      wrote on last edited by
      #5

      Again, can you get link to qunzip reference or source. We can't help you without this, because it's not popular library.

      --
      Vasiliy

      1 Reply Last reply
      0
      • K Offline
        K Offline
        kitten
        wrote on last edited by
        #6

        but the documentation in qunzip is italian and i know only english and persian
        i don't see any forum to answers questions
        what should i do?

        www.kitten.mihanblog.com

        1 Reply Last reply
        0
        • V Offline
          V Offline
          vsorokin
          wrote on last edited by
          #7

          Ok just give link to italian documentation, some Italian guys are on this forum

          --
          Vasiliy

          1 Reply Last reply
          0
          • K Offline
            K Offline
            kitten
            wrote on last edited by
            #8

            this is a italian documentation
            http://quazip.sourceforge.net/classJlCompress.html

            www.kitten.mihanblog.com

            1 Reply Last reply
            0
            • V Offline
              V Offline
              vsorokin
              wrote on last edited by
              #9

              So.... it's still qu a zip, not qu n zip

              --
              Vasiliy

              1 Reply Last reply
              0
              • K Offline
                K Offline
                kitten
                wrote on last edited by
                #10

                yes it was a writing problem i had ,sorry for that

                www.kitten.mihanblog.com

                1 Reply Last reply
                0
                • V Offline
                  V Offline
                  vsorokin
                  wrote on last edited by
                  #11

                  OK, this method:
                  @static QString extractFile(QString fileCompressed, QString file, QString fileDest = QString());@

                  get first param - path to your .zip file
                  get second param - name of file for extracting in .zip archive.
                  get third param - name for uncompressed version of file.

                  if third param is not set, fileDest = file, i.e. destination file will has same name ("mm" in your example)
                  After this method finished, destination file will created. and method return you path to this file (not data, data already in file on hdd).

                  More, it is static method, you are not needed create instance of JlCompress

                  just make:

                  @QString comp = JlCompress::extractFile(comp,"mm"); // comp is a filePath
                  ....
                  @

                  --
                  Vasiliy

                  1 Reply Last reply
                  0
                  • K Offline
                    K Offline
                    kitten
                    wrote on last edited by
                    #12

                    but i have my compressed file in the one of the cells of my table in db, it is bubble data
                    and i read it to a qstring
                    and i don't have the name of files on my compressed file
                    should i write it to a file?

                    www.kitten.mihanblog.com

                    1 Reply Last reply
                    0
                    • V Offline
                      V Offline
                      vsorokin
                      wrote on last edited by
                      #13

                      I think you can.
                      But for this you need use lower level of quazip, you need use QuaZip class
                      It has constructor
                      @QuaZip(QIODevice *ioDevice);@
                      and you can set QDataStream.

                      Also QuaZip class was written by russian guy and it has english documentation, also you can look to tests - its are good examples of using.

                      --
                      Vasiliy

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

                        A [[Doc:QDataStream]] is not a [[Doc:QIODevice]], one would have to pass a [[Doc:QFile]] or another QIODevice subclass to the QuaZip constructor.

                        How do you "have the compressed file in the cell" of your table? We speak of arbitrary binary data, which needs to be stored in a QByteArray and which is hardly ever readable to a human.

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

                        1 Reply Last reply
                        0
                        • V Offline
                          V Offline
                          vsorokin
                          wrote on last edited by
                          #15

                          [quote author="Volker" date="1317330881"]A :QDataStream is not a QIODevice[/quote]
                          Ahh! Shame on me! :-/

                          --
                          Vasiliy

                          1 Reply Last reply
                          0
                          • K Offline
                            K Offline
                            kitten
                            wrote on last edited by
                            #16

                            it is a blob cell that contain a zipped file, how can i use this with quazip?
                            i tried to open this blob cell to a qstring or qbytearray but it does'nt work correctly , it load only a few charachters , i think it has null values into it , what should i do?

                            www.kitten.mihanblog.com

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

                              Sorry, I misread your post. A "cell in the table" usually triggers the concept of something like a [[Doc:QTableWidget]] in Qt world (and not only there). You were referring to a BLOB column of a database table, which make much more sense.

                              In that case:
                              Read the BLOB data into a [[Doc:QByteArray]], feed that as that data storage to a [[Doc:QBuffer]] and feed that to the QuaZip constructor mentioned by Vass.

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

                              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