This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
ry00000's profile picture

Lua Compression Script

Started by ry00000, 18 June 2015 - 03:13 PM
ry00000 #1
Posted 18 June 2015 - 05:13 PM
Compression at its finest.
My program uses Creator's Compress program, and it downloads it if it doesn't find it.
It uses .ccb files (ComputerCraft Batch) and you're REQUIRED to have both .ccb as the extension AND a Lua file in the compressed dir. You can choose which file to run by entering it as the second argument.
Note that it recompresses the file when its done, so you can use it multiple times.
Use it like so: runcompressed <archivename> <filetorun> WITHOUT .ccb! It adds it automatically!
Compress the file like so: Folder structure: test/ contains main.lua. compress test test.ccb Then rm test aand there you go!
Run it like this: runcompressed test main.lua.
===============================THE DOWNLOAD===================================================
pastebin get 3eHXenP0 runcompressed
There it is. Give feedback. Constructive criticism is appreciated.




It Was For CCJam 2015.
Edited on 18 June 2015 - 03:15 PM
Pyuu #2
Posted 18 June 2015 - 05:22 PM
This almost feels like plagiarism because the majority of code isn't yours (the main application is Creator's).
Maybe make something a bit more elaborate.
flaghacker #3
Posted 18 June 2015 - 05:33 PM
Does it offer any more functionality then Creator's Compress program itself? The paste is like… 10 lines?
Creator #4
Posted 18 June 2015 - 05:33 PM
Lol, Compress is like 60 lines. Still, thank you for using my program.

I finally feel it is useful.

Else, I love the idea!
ry00000 #5
Posted 18 June 2015 - 06:41 PM
It runs a Lua file inside a compressed archive. We can use it to make single-command, but multiple-file programs like an UI, or an OS itself!
Creator #6
Posted 18 June 2015 - 08:17 PM
Why not go on and make a VFS?
ry00000 #7
Posted 23 June 2015 - 03:39 PM
A VFS? It technically IS a VFS!