14

The file format of the SEA ARC compression tool, also used by the PKWare PKARC tool, allowed the following compression types:

  • Packing (RLE encoding)

  • Squeezing (static Huffman coding)

  • Crunching (LZW), with different options from one version to another, with or without RLE pre-encoding, with or without dictionary reset:

    • 4K buffer, 12 bits codes
    • 4K buffer, variable length codes (9-12 bits)
  • Squashing: LZW with 8K buffer, variable length codes (9-13 bits)

The following two compression types are mentioned as "PAK only", supported by PKPAK, a short-lived successor of PKARC, I presume:

  • Crushing (described as Packing, then LZW 8K buffer, 2-13 bits ???)
  • Distilling (described as Dynamic Huffman with 8K buffer ???)

How did the LZW codes with less than 9 bits work in "crushing"?

What is "dynamic Huffman with buffer" in "distilling"?

For reference: an article describing, in great detail, the original (pre-Deflate) PKZIP compression types — Shrink, Reduce, Implode — is here: https://www.hanshq.net/zip2.html

6
  • 1
    V5 has squashing and crunching and you can look at the differences here - github.com/ani6al/arc/blob/… But I haven’t had time to dig into it yet.
    – Joe
    Commented Jun 15, 2022 at 2:36
  • atariarchives.org/cfn/12/02/0079.php Mentions crushing and distilling but a comment elsewhere linking to this doc says it has a number of inaccuracies throughout.
    – Joe
    Commented Jun 15, 2022 at 2:43
  • 2
    wiki.wxwidgets.org/Development:_ARC_File_Format
    – Joe
    Commented Jun 15, 2022 at 2:43
  • @Joe Thank you; I see that Squashing and Crushing are subsequent improvements of LZW (although using code width of less than 9 bits is not familiar to me), but what is distilling (dynamic Huffman with a buffer?) is unclear.
    – Leo B.
    Commented Jun 15, 2022 at 15:13
  • I am just guessing here: could it mean adaptive Huffman coding made in 8 kilobyte chunks?
    – tuomas
    Commented Jun 16, 2022 at 20:41

1 Answer 1

2

Take a look

{ 0x00, 0x03, "end of archive marker", NULL },
{ 0x01, 0x83, "stored (old format)", decompressor_stored },
{ 0x02, 0x83, "stored", decompressor_stored },
{ 0x03, 0x83, "packed (RLE)", decompressor_packed },
{ 0x04, 0x83, "squeezed (RLE + Huffman)", decompressor_squeezed },
{ 0x05, 0x83, "crunched5 (static LZW)", decompressor_crunched5 },
{ 0x06, 0x83, "crunched6 (RLE + static LZW)", decompressor_crunched6 },
{ 0x07, 0x83, "crunched7 (ARC 4.6)", NULL },
{ 0x08, 0x83, "crunched8 (RLE + dynamic LZW)", decompressor_crunched8 },
{ 0x09, 0x83, "squashed (dynamic LZW)", decompressor_squashed },
{ 10,  0x101, "trimmed", decompressor_trimmed },
{ 10,  0x201, "crushed", NULL },
{ 10,   0x01, "trimmed or crushed", NULL },
{ 0x0b, 0x01, "distilled", decompressor_distilled },
{ 20,   0x01, "archive info", NULL },
{ 21,   0x01, "extended file info", NULL },
{ 22,   0x01, "OS info", NULL },
{ 0x1e, 0x01, "subdir", NULL },
{ 0x1f, 0x01, "end of subdir marker", NULL },
{ 0x80, 0x02, "end of archive marker", NULL },
{ 0xff, 0x02, "compressed", decompressor_spark_compressed }

https://github.com/jsummers/deark/blob/6f5170c04ced2449db39c02af2e4ede19302a32e/modules/arc.c#L321

3
  • 3
    The question asked a few specific things. I don't think this answers them.
    – fadden
    Commented Jun 21, 2022 at 22:05
  • @fadden The link contains a full implementation but crunched7.
    – Polluks
    Commented Jun 22, 2022 at 7:53
  • 5
    That makes it a link-only answer, which are discouraged... meta.stackexchange.com/q/8231/144871
    – fadden
    Commented Jun 22, 2022 at 14:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .