Results 1 to 2 of 2

Thread: Introducing zp

  1. #1
    Expert
    Matt Mahoney's Avatar
    Join Date
    May 2008
    Location
    Melbourne, Florida, USA
    Posts
    3,255
    Thanks
    306
    Thanked 778 Times in 485 Posts

    Introducing zp

    zp is a simple ZPAQ compatible archiver. It has 3 compression modes (fast, mid, max) and includes optimizations for these modes that are twice as fast as interpreted models (equivalent to zpaq oc/ox). Unlike zpaq, it does not require a compiler installed to use the optimized code. It is built into the program. (I used zpaq to generate the code automatically).

    http://mattmahoney.net/dc/zp100.zip

    I included GPL source code (zp.cpp) and a Windows .exe (zp.exe). I also tested under Linux but you will need to compile it.

    fast mode is not quite as fast as min.cfg but compresses a lot better. It is a simple context mixing model with just 2 models, an order 2 ICM and order 4 ISSE with no mixer. Recall that an ICM maps a context to a (8 bit) bit history and then to a slow adapting probability. An ISSE maps a context to a bit history which is used to select a pair of weights for a 2 input mixer with one input from the ICM and the other fixed. Calgary corpus results (timed on a 2 GHz T3200):

    Code:
      Config       Size   c,x oc,ox  Memory
      -------   --------- ---- ---- -------
      min.cfg   1,030,817    3    2    4 MB
      fast.cfg    807,214    4    2   38 MB
      mid.cfg     699,474   12    8  111 MB
      max.cfg     644,433   36   20  246 MB
    The archiver is easier to use than zpaq. The commands are c1, c2, c3 (create fast, mid, max), a1, a2, a3 (append), l (list), x (extract with full paths), e (extract to current directory). As usual you can rename the extracted files to use it like a single file compressor like this:

    Code:
    zp c archive.zpaq input          (default is c2)
    zp x archive.zpaq output
    (The program automatically adds a .zpaq extension, something I neglected to do in the other programs).

    You can also extract from a single block with x1, x2,... Each c or a command appends one block of files in solid mode, but blocks are independent of each other. For details on usage, see notes in the source code.

    zp will extract from archives created with zpaq or zpipe. It is optimized for default configurations. For other configurations, it will interpret the code which is slower. Archives produced by zp are readable by zpaq, zpipe, and unzpaq.

    Future versions might support additional specialized models with auto detection of file type (exe, bmp, jpg, wav, etc).

  2. #2
    Programmer giorgiotani's Avatar
    Join Date
    May 2008
    Location
    Italy
    Posts
    166
    Thanks
    3
    Thanked 2 Times in 2 Posts
    It seems very interesting, I'll test it.
    Thank you very much and keep up the good work!

Similar Threads

  1. Introducing zpipe, a streaming ZPAQ compatible compressor
    By Matt Mahoney in forum Data Compression
    Replies: 0
    Last Post: 1st October 2009, 06:32
  2. introducing FastLZ
    By ariya in forum Forum Archive
    Replies: 19
    Last Post: 21st August 2007, 16:54

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •