Squeezing unzip onto mdv...

Anything QL Software or Programming Related.
Post Reply
User avatar
Chr$
QL Wafer Drive
Posts: 1313
Joined: Mon May 27, 2019 10:03 am
Location: Sachsen, Germany
Contact:

Squeezing unzip onto mdv...

Post 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.


https://QXL.WIN
Collector of QL related computers, accessories and QL games/software.
Ask me about felt pads - I can cut them to size and they have proved excellent for mdv data recovery.
User avatar
tofro
Font of All Knowledge
Posts: 2702
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: Squeezing unzip onto mdv...

Post 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


ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
User avatar
bwinkel67
QL Wafer Drive
Posts: 1202
Joined: Thu Oct 03, 2019 2:09 am

Re: Squeezing unzip onto mdv...

Post 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 123 times


User avatar
Chr$
QL Wafer Drive
Posts: 1313
Joined: Mon May 27, 2019 10:03 am
Location: Sachsen, Germany
Contact:

Re: Squeezing unzip onto mdv...

Post 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.


https://QXL.WIN
Collector of QL related computers, accessories and QL games/software.
Ask me about felt pads - I can cut them to size and they have proved excellent for mdv data recovery.
Post Reply