Welcome, Guest. Please login or register.

Author Topic: Creating a new file format (need suggestions)  (Read 2720 times)

Description:

0 Members and 2 Guests are viewing this topic.

Offline JoseTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 2871
    • Show all replies
Creating a new file format (need suggestions)
« on: May 04, 2005, 05:14:16 PM »
Hi. I need a good way to save a dynamic data structure that I created to HD. It consists of an Amiga linked list whose elements can be another forward only linked list I created, or a single element (same as those in the forward linked list). The forward linked list elements can also be forward linked lists and so on 8-)
Since I've never done this nor seen any example, can someone give some good advice ?
I'm thinking about creating a file format whose elements have an identifier that identifies the list and element. Nested lists would be saved inside it's lists.... whatever ...I still don't know if there's another way of doing it or any details I shouldn't miss..
\\"We made Amiga, they {bleep}ed it up\\"
 

Offline JoseTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 2871
    • Show all replies
Re: Creating a new file format (need suggestions)
« Reply #1 on: May 04, 2005, 05:58:03 PM »
@Daedalus

Yes!! Makes much more sense than trying to save all the elements with just an identifier. Even though I think here the search could skip lists by puting the size of each list along with it's identifier. But I'd still have to go through the elements of the first list successively, and then when wanted element is found search through it's elements again if it's another list.
 I guess the difference would be that all the elements (including other indexes) of a list would be referenced in the beginning on it's index. Is that how indexes are normally organized or they can be all condensed in the beggining for faster access ..?


\\"We made Amiga, they {bleep}ed it up\\"
 

Offline JoseTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 2871
    • Show all replies
Re: Creating a new file format (need suggestions)
« Reply #2 on: May 04, 2005, 06:18:45 PM »
@Joshua
I'm not a programmer, I've never learned XML and I don't want to have the hassle of having to learn it. But maybe it's easy.

@mdma
:-D Yes, sounds like a good idea, I've actually read the IFF specification once, but never used it and forgot it by now... It's a lot more work though, I think.

@mjerics

"Or do you want to be able to access any node in the list, and said list can be too big to fit into physical memory? "

It will most likely allways fit on physicall memory but I want to be able to know in which list each node belongs too after saving to HD.    
\\"We made Amiga, they {bleep}ed it up\\"