05-07-2017, 09:16 PM
(05-06-2017, 04:46 AM)zADAN Wrote:(05-05-2017, 11:53 PM)ThatTrueStruggle Wrote:Code:comtype COMP_UNZIP_DYNAMIC
get ZSIZE long
get NAME basename
string NAME += ".narc"
get ASIZE asize
math ASIZE - 4
clog NAME 4 ASIZE ZSIZE
Here you go. It decompresses the TZIP into NARC files.
Wow! What kind of sorcery was that? The ".tzip" file was a 644 KB size and the code extracted a few ".narc" files, one of 6 MB.
Awesome and thanks! You will be in the credits for this translation.
It's called compression It compressed it pretty well and made the file smaller.
Here you go. I wrote this in about an hour and wasn't too hard. Usage below:
Code:
MTX2TXT -d inputMTX outTXT : This decodes an MTX into a TXT file. Replace inputMTX with the path to the MTX file and outTXT with the name you want to it be.
MTX2TXT -e inputTXT outMTX: This encodes a TXT file into a MTX file. Replace inputTXT with the path to the TXT file and outMTX with the name you want to it be.
When you want to encode a text file, make sure you have the setup like the decoded MTX files (text on new lines for each one)
This was a fun little project and I haven't had so much fun writing something like this in a while. Hope you enjoy!
(I can provide source code to this if you'd like to look at how it works, it's pretty simple)