Unfortunately the new version runs a bit slower on my computer. zpaq uses libdivsufsort-lite for -m1 (default) and -m2 compression. I tested on enwik8 using 16 MB blocks (default, 2 threads) and 100 MB blocks (1 thread) on a 2.0 GHz T3200, 3 GB, under Vista. I compiled with MinGW g++ 4.6.1: "g++ -O3 zpaq.cpp libzpaq.cpp divsufsort.c". zpaq1 is the new version.
Code:
C:\tmp>timer .\zpaq -m1 c enwik8.zpaq \res\enwik8
Timer 3.01 Copyright (c) 2002-2003 Igor Pavlov 2003-07-10
Overwriting archive enwik8.zpaq
[1] \res\enwik8 16000000 -> 3985845 (1.9929 bpc)
[2] \res\enwik8+16000000 16000000 -> 4001739 (2.0009 bpc)
[3] \res\enwik8+32000000 16000000 -> 3988989 (1.9945 bpc)
[4] \res\enwik8+48000000 16000000 -> 4007152 (2.0036 bpc)
[5] \res\enwik8+64000000 16000000 -> 3993157 (1.9966 bpc)
[6] \res\enwik8+80000000 16000000 -> 4025764 (2.0129 bpc)
[7] \res\enwik8+96000000 4000000 -> 1032769 (2.0655 bpc)
31 seconds
Kernel Time = 0.951 = 00:00:00.951 = 3%
User Time = 57.361 = 00:00:57.361 = 188%
Process Time = 58.313 = 00:00:58.313 = 191%
Global Time = 30.498 = 00:00:30.498 = 100%
C:\tmp>timer .\zpaq1 -m1 c enwik8.zpaq \res\enwik8
Timer 3.01 Copyright (c) 2002-2003 Igor Pavlov 2003-07-10
Overwriting archive enwik8.zpaq
[1] \res\enwik8 16000000 -> 3985845 (1.9929 bpc)
[2] \res\enwik8+16000000 16000000 -> 4001739 (2.0009 bpc)
[3] \res\enwik8+32000000 16000000 -> 3988989 (1.9945 bpc)
[4] \res\enwik8+48000000 16000000 -> 4007152 (2.0036 bpc)
[5] \res\enwik8+64000000 16000000 -> 3993157 (1.9966 bpc)
[6] \res\enwik8+80000000 16000000 -> 4025764 (2.0129 bpc)
[7] \res\enwik8+96000000 4000000 -> 1032769 (2.0655 bpc)
31 seconds
Kernel Time = 0.936 = 00:00:00.936 = 3%
User Time = 57.891 = 00:00:57.891 = 189%
Process Time = 58.827 = 00:00:58.827 = 192%
Global Time = 30.529 = 00:00:30.529 = 100%
For the single threaded version (one 100 MB block) I tested each 3 times.
Code:
C:\tmp>timer .\zpaq -m1 -b100 c enwik8.zpaq \res\enwik8
Timer 3.01 Copyright (c) 2002-2003 Igor Pavlov 2003-07-10
Overwriting archive enwik8.zpaq
[1] \res\enwik8 100000000 -> 22823444 (1.8259 bpc)
56 seconds
Kernel Time = 0.686 = 00:00:00.686 = 1%
User Time = 55.458 = 00:00:55.458 = 98%
Process Time = 56.144 = 00:00:56.144 = 99%
Global Time = 56.488 = 00:00:56.488 = 100%
C:\tmp>timer .\zpaq1 -m1 -b100 c enwik8.zpaq \res\enwik8
Timer 3.01 Copyright (c) 2002-2003 Igor Pavlov 2003-07-10
Overwriting archive enwik8.zpaq
[1] \res\enwik8 100000000 -> 22823444 (1.8259 bpc)
57 seconds
Kernel Time = 0.546 = 00:00:00.546 = 0%
User Time = 55.817 = 00:00:55.817 = 98%
Process Time = 56.363 = 00:00:56.363 = 99%
Global Time = 56.582 = 00:00:56.582 = 100%
C:\tmp>timer .\zpaq -m1 -b100 c enwik8.zpaq \res\enwik8
Timer 3.01 Copyright (c) 2002-2003 Igor Pavlov 2003-07-10
Overwriting archive enwik8.zpaq
[1] \res\enwik8 100000000 -> 22823444 (1.8259 bpc)
57 seconds
Kernel Time = 0.733 = 00:00:00.733 = 1%
User Time = 55.489 = 00:00:55.489 = 97%
Process Time = 56.222 = 00:00:56.222 = 99%
Global Time = 56.644 = 00:00:56.644 = 100%
C:\tmp>timer .\zpaq1 -m1 -b100 c enwik8.zpaq \res\enwik8
Timer 3.01 Copyright (c) 2002-2003 Igor Pavlov 2003-07-10
Overwriting archive enwik8.zpaq
[1] \res\enwik8 100000000 -> 22823444 (1.8259 bpc)
57 seconds
Kernel Time = 0.639 = 00:00:00.639 = 1%
User Time = 55.863 = 00:00:55.863 = 98%
Process Time = 56.503 = 00:00:56.503 = 99%
Global Time = 56.800 = 00:00:56.800 = 100%
C:\tmp>timer .\zpaq -m1 -b100 c enwik8.zpaq \res\enwik8
Timer 3.01 Copyright (c) 2002-2003 Igor Pavlov 2003-07-10
Overwriting archive enwik8.zpaq
[1] \res\enwik8 100000000 -> 22823444 (1.8259 bpc)
57 seconds
Kernel Time = 0.592 = 00:00:00.592 = 1%
User Time = 55.536 = 00:00:55.536 = 98%
Process Time = 56.129 = 00:00:56.129 = 99%
Global Time = 56.473 = 00:00:56.473 = 100%
C:\tmp>timer .\zpaq1 -m1 -b100 c enwik8.zpaq \res\enwik8
Timer 3.01 Copyright (c) 2002-2003 Igor Pavlov 2003-07-10
Overwriting archive enwik8.zpaq
[1] \res\enwik8 100000000 -> 22823444 (1.8259 bpc)
57 seconds
Kernel Time = 0.717 = 00:00:00.717 = 1%
User Time = 55.817 = 00:00:55.817 = 98%
Process Time = 56.534 = 00:00:56.534 = 99%
Global Time = 56.894 = 00:00:56.894 = 100%
Edit: compiling in 64 bit Linux g++ 4.5.2 gives the following errors:
Code:
matt@matt-Latitude-E6510:~/t$ g++ -O3 zpaq.cpp libzpaq.cpp libdivsufsort-lite/divsufsort.c -fopenmp -o zpaq1 -DNDEBUG
libdivsufsort-lite/divsufsort.c: In function ?int* ss_median3(const unsigned char*, const int*, int*, int*, int*)?:
libdivsufsort-lite/divsufsort.c:358:35: error: cast from ?int*? to ?int? loses precision
libdivsufsort-lite/divsufsort.c:358:35: error: cast from ?int*? to ?int? loses precision
libdivsufsort-lite/divsufsort.c:358:35: error: cast from ?int*? to ?int? loses precision
libdivsufsort-lite/divsufsort.c:358:35: error: cast from ?int*? to ?int? loses precision
libdivsufsort-lite/divsufsort.c:358:35: error: cast from ?int*? to ?int? loses precision
libdivsufsort-lite/divsufsort.c:358:35: error: cast from ?int*? to ?int? loses precision
libdivsufsort-lite/divsufsort.c: In function ?int* tr_median3(const int*, int*, int*, int*)?:
libdivsufsort-lite/divsufsort.c:1136:31: error: cast from ?int*? to ?int? loses precision
libdivsufsort-lite/divsufsort.c:1136:31: error: cast from ?int*? to ?int? loses precision
libdivsufsort-lite/divsufsort.c:1136:31: error: cast from ?int*? to ?int? loses precision
libdivsufsort-lite/divsufsort.c:1136:31: error: cast from ?int*? to ?int? loses precision
libdivsufsort-lite/divsufsort.c:1136:31: error: cast from ?int*? to ?int? loses precision
libdivsufsort-lite/divsufsort.c:1136:31: error: cast from ?int*? to ?int? loses precision