1. Saving a sequence to disk...
- Posted by Ralf Nieuwenhuijsen <nieuwen at POP.XS4ALL.NL> May 29, 1997
- 633 views
--Message-Boundary-10301 Content-type: text/plain; charset=US-ASCII Content-description: Mail message body Saving a sequence to disk is ready... ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Because the file is so small, i have attachted it to this mail, cause is must be of some interest for most people on the list-serv. Ever seen the directory of the Lion King (you know, the game). Have you noticed that there is only ONE file containing all the data. But most Euphoria programs have zillions of files.... ..why?? Well, no need anymore with these new routines. sequence = edo_load ( file_name ) Returns the object saved in file_name as an sequence, (atoms and integer become one-length sequences: 5 to {5}, normal sequences are restored identical to the object that was saved. boolean = edo_save( file_name , object ) It saves the Euphoria object (either of type object, atom or sequence) to file_name maintaining it's structure in the shortest way possible and with compression. If it isn't a sequence it becomes a one-length sequence ( 5 to {5} ) It is being saved in the shortest data type possible, and then after that the compression routine of Daniel Berstein compresses the given bits of data and writes it to disk. His code and my old EDM.E code are combined and altered so they can easiliy work together and the result is powerfull. I strongly support the update of the sfx2 and font library to handle sequences containing the file data, normally loaded. Offcourse everybody can see the posibilities for graphics, levels, highscores, multi-file compression tools and the most important one: DATABASES. I also support the extension of EDO, which stands for Euphoria Data Object, but you can use any extension you want. Hope some of you like this.... it is very good replacement for the gfx_file.e included in the engine of XP3. And now i'm going to bed, i have school in 8 hours, oops! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Ralf Nieuwenhuijsen nieuwen at xs4all.nl --Message-Boundary-10301 Content-type: text/plain; charset=US-ASCII Content-disposition: inline Content-description: Attachment information. The following section of this message contains a file attachment prepared for transmission using the Internet MIME message format. If you are using Pegasus Mail, or any another MIME-compliant system, you should be able to save it or view it from within your mailer. If you cannot, please ask your system administrator for assistance. ---- File information ----------- File: edom.zip Date: 28 May 1997, 23:27 Size: 3044 bytes. Type: ZIP-archive --Message-Boundary-10301 Content-type: Application/ZIP; name=edom.zip
2. Re: Saving a sequence to disk...
- Posted by "mrunner at webaccess.net" <mrunner at WEBACCESS.NET> May 28, 1997
- 660 views
Ralf Nieuwenhuijsen wrote: > Ever seen the directory of the Lion King (you know, the game). Have > you noticed that there is only ONE file containing all the data. But > most Euphoria programs have zillions of files.... ..why?? If you're making a finished product, creating a large file containing all the data is a great idea. But because most Euphoria programmers aren't concerned with how many files they distribute. And if you're giving out the code to your programs, people are going to want the files handy, not one big data file. It's not worth the extra effort for nothing. -- - MiD ( mrunner at webaccess.net / http://rmi.net/~kaliste/ ) nothing:information Service: 1 - 719 - 380 - 1396 iLLoGiK ushq / Project Gabbangelion ushq unofficial Kosmic distro