Hi! There is a new DOjS release, as mentioned on

https://sourceforge.net/p/freedos/news/

unfortunately, the freedos zip is 61 MB in size :-o

https://ibiblio.org/pub/micro/pc-stuff/freedos/files/devel/js/dojs/1.13.0/

This made me wonder how it could be made smaller.

The TL;DR answer is: Use 7Z, not ZIP, for the sources to
shrink the download, but you can also save dozens of MB
in the installed size by using a small set of tricks.



A simple way to shrink the installed package is UPX:

20519 -> 13435 65.48% dos/exe CWSDPMI.EXE 194048 -> 103576 53.38% djgpp2/coff TEXUS.EXE 2163712 -> 1069252 49.42% djgpp2/coff DOJS.EXE 113664 -> 62328 54.84% djgpp2/coff FNTCONV.EXE -------------------- ------ ----------- -----------
   2491943 ->   1248591   50.11%                 [ 4 files ]

The next thing is that the example images are large:

There are 3.6 MB of uncompressed BMP included.

Given that DOjS also supports TGA, PNG, PCX etc., an easy way
to save space would be to convert some of the BMP and TGA
examples to PNG or JPG (even WEBP seems to be supported!)
and adjust image file names in the example scripts which
open them. Maybe the maintainers could even do it upstream,
so the size-saving is persistent and cross-platform? :-)

As already mentioned in an earlier thread, a tool which can
compress DXE would be nice: There are > 6 MB of those in the
package, which would probably compress by 50% like the EXE.



However, the single largest part of DOjS are the sources.

Those are roughly 54 MB as a ZIP, but would already be
smaller in a compact archive format like TGZ or 7Z. The
latter would be only 34 MB of SOURCES.7Z for example and
I think we already have enough 7Z support to use that :-)

Interestingly, that helps only a bit: 50 MB ZIP,
or 31 MB 7Z, when one deletes the PS and DVI of

3rdparty/allegro-4.2.2-xc-master/docs/html

keeping "only" the HTML, PDF and TEXI files and deletes

the 3rdparty/mbedtls-3.6.2/tests/ subtree, which would
in large parts only be useable with Perl and Python.

See the section on NOT using or installing tests in the
README.md of the bundled mbedtls sources themselves :-p

Note that the sources include both allegro 4.3.3.1, used
for the Linux and Win32 port and 4.2.2, probably for DOS?

Even though the compressed sources are not easy to get
much smaller (I suggest including only ONE Allegro here)
it still helps to significantly reduce the "installed"
size of the sources to omit the mbedtls tests/ subtree
and the mentioned PS and DVI of Allegro docs. This gets
the installed sources down from > 220 MB (!) to 192 MB.

Cheers, Eric



_______________________________________________
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel

Reply via email to