Jump to content




[WIP] MZIP, a folder compression system


  • You cannot reply to this topic
5 replies to this topic

#1 EveryOS

  • Members
  • 570 posts
  • LocationOver there ->

Posted 04 July 2018 - 12:24 AM

TESTED ON AN UNOFFICIAL VERSION OF CC
NOTICE: This is an unofficial release. Things will change!
MZIP is an ultra-fast folder compression system I wrote and tested

To download it, run these commands:
wget https://github.com/JasonTheKitten/mzip/blob/master/mzip.mzip?raw=true mzip.mzip
pastebin run PTt13khW #extract mzip.mzip mzip
cp mzip/main.lua mzip.lua
rm mzip.mzip


USAGE:
mzip #compress <folder> <file>.mzip
mzip #extract <file>.mzip <folder>

NOTICE: Files created with MZIP do not currently upload correctly to pastebin. I plan to add a pastebin-safe uploader in future versions. For now, please use GitHub, paired with either Git or the file uploader, but not copy/paste


TODO:
Pastebin safe
An API
Runnable MZIP files
Use getopts for argument checking
LZW and character-repetition-reduction techniques
File compression (this will be easy to implement)
Checksums
Extract online files

Edited by EveryOS, 04 July 2018 - 03:27 PM.


#2 EveryOS

  • Members
  • 570 posts
  • LocationOver there ->

Posted 04 July 2018 - 03:11 PM

I forgot to mention, it is completely silent, so you can use it in your programs, as so:
local mzip = {}
mzip.compress = function(inf, outf)
 loadfile("mzip/main.lua", _G)("#compress", inf, outf..".mzip")
end
mzipde.decompress = function(inf, outf)
 loadfile("mzip/main.lua", _G)("#extract", inf..".mzip", outf)
end
You can also use individual files if you need a specific part of this, but it is not recommended
CODE
Note that YOU DO NOT HAVE TO INSTALL MZIP TO USE IT, BUT YOU CAN
In fact, installing MZIP uses MZIP

Edited by EveryOS, 04 July 2018 - 11:33 PM.


#3 Quartz101

  • Members
  • 141 posts
  • Location/dev/nvme0n1

Posted 04 July 2018 - 09:05 PM

I mean, it's not like LZW is hard, lualzw works when you require() it.

#4 EveryOS

  • Members
  • 570 posts
  • LocationOver there ->

Posted 04 July 2018 - 11:30 PM

Yea, I'm going to add it. For now, I'm using Huffman coding (or at least I think I am, but it works). I will be sure to include data in the file header character, so that MZIP will know if the compressed file is using LZW or not (For compatibility reasons)

Edited by EveryOS, 04 July 2018 - 11:34 PM.


#5 Quartz101

  • Members
  • 141 posts
  • Location/dev/nvme0n1

Posted 06 July 2018 - 11:38 PM

Hey, at least you're not base64'ing it and calling it compression!

#6 EveryOS

  • Members
  • 570 posts
  • LocationOver there ->

Posted 07 July 2018 - 12:23 AM

When I make the pastebin-uploader, I might use b64 for that sake, but for offline files, never





2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users