Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to index page
Thread view  Board view
Rugxulo

Homepage

Usono,
20.05.2009, 05:30
 

Ilia M.'s Gzip 1.2.4 "hack" (improved -9) (Announce)

I finally figured out how to compile Ilia M.'s Gzip 1.2.4 hack with OpenWatcom 1.8 (deflate_max improves -9 without being nearly as slow as 7-Zip). By default his only comes with a Win32 .EXE, which is annoying in pure DOS even with HXRT (needs LFNs). So I've built both DOS and Win32 binaries.

gzhakwat.zip (311k)

Archive:  gzhakwat.zip
Zip file size: 318072 bytes, number of entries: 7
-rw-a--     3.0 fat    33957 t- defX 07-Aug-14 00:06 deflate.c
-rw-a--     3.0 fat     1018 t- defX 09-May-19 22:03 enwik8_d.txt
-rw-a--     3.0 fat     1013 t- defX 09-May-19 22:03 enwik8_e.txt
-rwxa--     3.0 fat     1299 t- defX 09-May-19 21:58 wmake-gz.bat
-rwxa--     3.0 fat    54584 b- defX 09-May-19 22:04 gziphakd.exe
-rwxa--     3.0 fat    46080 b- defX 09-May-19 22:03 gziphakw.exe
-rw-a--     3.0 fat   211474 b- stor 09-May-19 22:13 gzip124s.tgz
7 files, 349425 bytes uncompressed, 317356 bytes compressed:  9.2%


> http://www.cs.fit.edu/~mmahoney/compression/text.html#3211
>
> .3211 gzip124hack
> gzip124hack is a modified version of gzip 1.2.4 by Ilia Muraviev,
> Aug. 13, 2007. It uses LZ77. It is a file compressor like gzip,
> except that it does not delete the input file. It improves
> compression by using LZ77 lazy matching with 2 byte lookahead.
> The compressed format is compatible with gzip. -9 selects
> maximum compression.

Basically, it compresses better than typical Gzip:

                          enwik8      enwik9
gzip124hack 1.2.4 -9    36,273,716  321,050,648
gzip 1.3.5        -9    36,445,248  322,591,995


If you really want to read about it, see the news://comp.compression thread from two years ago.

Rugxulo

Homepage

Usono,
20.05.2009, 08:16

@ Rugxulo
 

Ilia M.'s Gzip 1.2.4 "hack" (improved -9)

> I finally figured out how to compile Ilia M.'s Gzip 1.2.4 hack with
> OpenWatcom 1.8 (deflate_max improves -9 without being nearly as slow as
> 7-Zip). By default his only comes with a Win32 .EXE, which is annoying in
> pure DOS even with HXRT (needs LFNs). So I've built both DOS and Win32
> binaries.

Note that 1.2.4 is fairly old, and obviously 7-Zip compresses Deflate better, and you can use AdvanceDef (advdef -z4) to recompress your .gz files in place instead of manually unpacking / repacking. BUT ... if you only want a slight bit better compression with reasonable speed, the 1.2.4 hack will work okay.

P.S. I figured out that you can get the same results with DJGPP (GCC) only if you do -DNO_ASM and remove match.S from the makefile (since DJGPP optimizes better). Of course, it doesn't by default have the LFN-aware patch that the latest DJGPP port of Gzip (1.3.12) has. But whatever, just FYI. ;-)

Back to index page
Thread view  Board view
22632 Postings in 2109 Threads, 402 registered users, 442 users online (0 registered, 442 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum