Is it possible to compile the ZLIB library in a way that it is able to support (especially decompress) LZSS, LZW, ZIP and/or other compression algorithms?
What compiler switches/source code modifications have I to follow to achieve this?
Thank you in advance.
Posted on 2009-12-17 16:07:28 by TasmDev
Afaik, zlib only supports ZIP, which is a combination of LZ77 and Huffman.
Posted on 2009-12-17 16:37:34 by Scali
ALL of these compression algorithms are based on lempel-zif-huffman (spell?)
Seriously? Just look at the NTCompress api.
You do NOT wanna support 'all' compressions - some are protected under DMCA and other copyright laws, others are so old that you'll be unlikely to ever encounter files compressed by them.
Has been working with compression algorithms ever since they began, on 8 bit systems, where they were originally called "bitpackers" (the term compression did not exist prior to the advent of the LHARC algorithm afaik).
Posted on 2009-12-18 01:34:09 by Homer
Another thing I'd like to point out... LZ and Huffman are just algorithms, they are not file formats. There are various different file formats that use the same compression algorithms. Because they store their data in slightly different ways, the code and data aren't just interchangeable between different implementations.
Posted on 2009-12-18 02:40:30 by Scali
Lempel-Ziv, Welch added for LZW :)

How can a compression algorithm be protected under DMCA? O_o - Copyright/patents I get, but DMCA?

Anyway, what do you want to do? De/compress zip (or other) archives, or pick a decent compression algorithm for other uses?
Posted on 2009-12-18 07:27:37 by f0dder
Lempel-Ziv-Welch was patented by Unisys (Welch's employer at the time), but it expired a while ago.
Lempel-Ziv and Huffman have always been patent-free.
Posted on 2009-12-18 07:45:44 by Scali

Lempel-Ziv-Welch was patented by Unisys (Welch's employer at the time), but it expired a while ago.
Lempel-Ziv and Huffman have always been patent-free.
Yep, it was quite a while ago - no need to worry about using GIF images anymore ;)
Posted on 2009-12-18 07:51:50 by f0dder


Lempel-Ziv-Welch was patented by Unisys (Welch's employer at the time), but it expired a while ago.
Lempel-Ziv and Huffman have always been patent-free.
Yep, it was quite a while ago - no need to worry about using GIF images anymore ;)


Yea, I wrote my GIF decoder during the patent time though, lol :)
I think the policy of Unisys was to allow free use of decoders, but to charge encoders.
Posted on 2009-12-18 08:08:02 by Scali

How can a compression algorithm be protected under DMCA? O_o - Copyright/patents I get, but DMCA?

maybe the algo's used on the contents of dvd movies?
Posted on 2009-12-21 20:45:47 by rags


How can a compression algorithm be protected under DMCA? O_o - Copyright/patents I get, but DMCA?

maybe the algo's used on the contents of dvd movies?
Doesn't the DMCA "only" cover trying to subvert a copy protection? Unless we're talking an unpublished compression algorithm which you have to reverse-engineer from some protection scheme, I don't see how the DMCA would apply :)
Posted on 2009-12-22 07:26:24 by f0dder

Doesn't the DMCA "only" cover trying to subvert a copy protection? Unless we're talking an unpublished compression algorithm which you have to reverse-engineer from some protection scheme, I don't see how the DMCA would apply :)


I think technically you need to class that algorithm as 'encryption' rather than 'compression'.
I suppose the two are closely related, as they both do a reversible encoding of an arbitrary stream of bytes... But I guess the main difference is semantics (is the goal to minimize the size of the data, or to keep unauthorized people from accessing the data?), and that's where the legal stuff would come in.

I'd have to put my question marks around this notion though... Does this mean that if you create a poor encryption method, that you can still sue people because of the DMCA? Eg, you just take zlib and call it 'encrypted'... anyone who bothers to open the file with a zip-compatible decompressor will be able to read it (eg Quake/Doom PAK files?) Or is there some responsibility to at least have encryption that meets certain security standards?
Posted on 2009-12-22 07:42:27 by Scali