New Stack Format Idea
Posted: Wed Jul 17, 2013 7:22 pm
Hey folks, I have an idea for when you get around to working on the newer engine and thus a newer stack format and that is, what if we could load a stack into the memory using a sequence of bytes. Now the grounds for this idea are that I believe the way a stack works is that it is effectively a data structure that is serialized to disk, I've worked with serialization in Java for University and I think this would be a great addition.
If for example, I am going to store all the files I have for a stack into a ZIP archive and have just the ZIP and the built executable on the users hard drive, it would be great if I could just read in a stack from the ZIP (Without extracting to a temporary location) and store the binary data in a variable and then pass this to the engine to be constructed into the in memory version of the stack, effectively, something akin to this:
The engine would then take the data and reconstruct the stack in the memory as if it had just read it in as a normal file. I think people would benefit from this, because in the example above, a ZIP file could keep the disk space occupied down if someone built a really big LiveCode app, personally I would use this sort of thing as virtual file system for Xenon, it would give me the opportunity to do things like file and folder ACLs.
If for example, I am going to store all the files I have for a stack into a ZIP archive and have just the ZIP and the built executable on the users hard drive, it would be great if I could just read in a stack from the ZIP (Without extracting to a temporary location) and store the binary data in a variable and then pass this to the engine to be constructed into the in memory version of the stack, effectively, something akin to this:
Code: Select all
// The code that would go here would read the file from the ZIP archive and store it in a variable called tStackData
Put The Short Name Of Stack tStackData Into tStackName