do you (ken) or anyone know how winzip works? or have the source code (C++ but preferably QBASIC) for the algorithm? or is this cpy righted :) if so never mind :D is winrar open source?
Frobozz at
This article on wikipedia offers some info: http://en.wikipedia.org/wiki/DEFLATE
It also points to the zlib library that some people use in their programs. It's good in game creation kits for one thing. :wink:
Awesoken at
If you want to know how DEFLATE works in detail, then this is the best resource: RFC1951. I referred to it extensively when writing PNGOUT & KZIP.
The spec doesn't talk about compression algorithms. The bottleneck in my own deflate algorithm is by far the pattern matching. At minimum, you should at least use some kind of hashing table to accelerate the initial 3-byte string matching. Any tricks you do beyond that is up to you - there's really no right answer. Whatever you choose, there's going to be a trade-off between speed and compression ratio.
BarrenSoul at
thanks :) (wikipedia is an awsome resource for just about anything :) )
Stanton at
Ken? umm can you make a GUI/gfx based zip program? and not cmd line :shock:
Awesoken at
Yes, I could. I plan to make a GUI-based version of PNGOUT first since there's more demand for PNGOUT than KZIP. It will be a plugin for IrfanView... to be released whenever Irfan decides it's ready : )
FreeDOSfan at
KZIP for DOS
KZIP is an interesting programm. Could you make a DOS version of it ?
Just select the corect target (DOS/4GW, Causeway or DOS/32A) and compile again ?
:) :)
Answer to "BarrenSoul": WINZIP is bad. :( It is commercial, expensive and has and never
had any unique features. It is just :( "WIN" :( Use 7-ZIP instead (Open source incl.
UNRAR).
FreeDOSfan at
KZIP & WINZIP
I wanted to say: WINZIP "does not have and did never have any unique features"
counting_pine at
winzip
Also, since probably WinZip's main feature is to make things easier for inexperienced computer users (you don't see 7-zip with an "Extract Wizard" mode:) for inexperienced computer users, it probably means its deflate algorithm is designed more for speed than compression levels.
Probably the best way to find an algorithm is to look at 7zip/Zlib's source code (sadly, even simple code isn't exactly light reading) or to ask someone very nicely to produce some for you.
Of course, if you just try and be inventive and come up with your own algorithm, then it might have an edge over other ones:)
I've been doing a bit of work on deflating in Visual Basic. Thanks to some C code that Ken gave me, I worked out how to write Non-Compressed blocks. Recently I've moved on a bit, and I can now write Fixed-Huffman blocks although it doesn't pattern-matching (yet). If you want, I can try and put it into QBASIC for you, and post it up here.
FreeDOSfan at
Winzip, Deflate algo
To counting_pine: Thanks for the offer. I already do have some infos & sources
about Deflate & Compression in general, some are mentioned here. If you have a source
beating Winzip & PKZIP while staying compatible with PKZIP 2.x (similar to KZIP), please post
it here: C (preferably not OOP or C+++++++++) or QBASIC (better). :) :)
My post was intended specially to Ken: He does have the KZIP source and it could be
(I am not sure) maybe easy to compile it again just to another target
(DOS/32A instead of Win32 text mode). :)
WINZIP: I was not educated by M$ (to Drug & Drop) so when a saw Winzip first
(didn't know about all the better programms yet :( ) I found out: Haaaaaaaa ...
what now ???
counting_pine at
winzip
I don't have any programs that work advanced algorithms. My Fixed-Huffman code doesn't do pattern matching, which means it actually results in larger file sizes. But, the output is zlib-compatible, so I can use it for making PNGs.
So, I'm just offering to post it up as an aid to anyone who might be interested in making a deflate program, but aren't sure where to start.
Awesoken at
Ok, I recompiled KZIP for DOS using Open Watcom 1.3 and DOS4G/W. You can download it here: