Page 1 of 1

Squeezing unzip onto mdv...

Posted: Fri Jun 12, 2020 4:10 pm
by Chr$
Is it possible?

For a senseless project I'm trying to squeeze QL unzip onto a real mdv cartridge. The unzip program is about 110k, which just about fits onto some cartridges (but not all because some don't format with enough sectors).

It there a working version of QL unzip that is considerably smaller or is there a way of reducing its size somehow? I get nervous with things that take up the entire mdv cart.

Re: Squeezing unzip onto mdv...

Posted: Fri Jun 12, 2020 4:20 pm
by tofro
If you're happy with a program that is only able to unzip the first file from a zip file (maybe because you've put only one file in there), you can use funzip, which is part of the infozip QL package and only about one third of unzip's size.

funzip unzips the first file of an archive to stdout, so must be used a bit differently:

Code: Select all

ex funzip;"test_zip >ram1_test_txt"
will extract the first file in test_zip (regardless what its name is) and write its contents to ram1_test_txt. I'm pretty sure you will also lose the file's header if it had one.

Tobias

Re: Squeezing unzip onto mdv...

Posted: Fri Jun 12, 2020 6:57 pm
by bwinkel67
Here is the full 110K version of unzip "smashed" down to 60K. I tested it and it works as advertised (you just need more than 128K of RAM)...i.e. you can type:

exec_w mdv1_unzip_smash;"mdv2_file_zip"
unzip.zip
(56.69 KiB) Downloaded 145 times

Re: Squeezing unzip onto mdv...

Posted: Fri Jun 12, 2020 7:27 pm
by Chr$
Thanks both.

I don't think either of those will be suitable as I can envisage the need to unzip an _exe and it's also mainly designed for a bog standard 128k QL.