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. Save a big data structure to Disk and load it back .
Forum Updated to NodeBB v4.3 + New Features

Save a big data structure to Disk and load it back .

Scheduled Pinned Locked Moved General and Desktop
3 Posts 3 Posters 1.1k 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.
  • saeedhardanS Offline
    saeedhardanS Offline
    saeedhardan
    wrote on last edited by
    #1

    hi,
    I'm using Qt to develop in c++ , i have a big text file that i read and build a big suffix Tree from its information ,
    loading the file and building the tree takes a considerable amount of time ,
    My question is how can i save to Disk the suffix tree that i created and when next time i load the program i can just read the tree without having to build it again ?

    1 Reply Last reply
    0
    • dheerendraD Offline
      dheerendraD Offline
      dheerendra
      Qt Champions 2022
      wrote on last edited by
      #2

      XML May help you. Try QDomDocument.

      Dheerendra
      @Community Service
      Certified Qt Specialist
      http://www.pthinks.com

      1 Reply Last reply
      0
      • A Offline
        A Offline
        andreyc
        wrote on last edited by
        #3

        Another option is to use "QDataStream":http://qt-project.org/doc/qt-5/qdatastream.html#reading-and-writing-raw-binary-data

        It is less portable than XML but may be a bit faster.

        For example "QImage uses it":http://code.woboq.org/qt5/qtbase/src/gui/image/qimage.cpp.html#_ZlsR11QDataStreamRK6QImage

        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