August 9, 2007 Edition
JPEG Compression Test
Allume, the people who make the Stuffit archiver have created a new compression algorithm that will losslessly compress JPEG files by an average of 30% (they claim). This algorithm will be part of the Stuffit 9 software. I have done some benchmark testing to first see if their claim is legit and how well their compression performs against other lossless compression algorithms. This is not a test to see how well other image formats do compared to JPEG, but how well lossless compression algorithms can perform on already-compressed JPEG images. With the huge number of JPEG images on the web and from digital cameras, being able to compress JPEG pictures further, without losing any image quality may be of interest to many people.
The test computer used was a Pentium4 1.8GHz with 512MB of RAM running Windows 2000.
The three JPEG test files are:
Welcome Slashdot! If you use BZIP2 you might also be interested in my open source Parallel BZIP2 software.
DSCN3974.jpg (National Art Gallery, Ottawa, Canada) | ||
File size: 1114198 bytes | ||
Resolution: 2048 x 1536 | ||
Jpeg process: Baseline (Nikon Fine Compression) | ||
SHA-1 Hash: f6b3b306f213d3f7568696ed6d94d36e58b4ce1b |
DSCN4465.jpg (Golden Pagoda, Kyoto, Japan) | ||
File size: 694895 bytes | ||
Resolution: 2048 x 1536 | ||
Jpeg process: Baseline (Nikon Normal Compression) | ||
SHA-1 Hash: 5f3d92f558d7cc2d850aa546ae287fa7b61f890d |
DSCN5081.jpg (AI Building, MIT, USA) | ||
File size: 516726 bytes | ||
Resolution: 2048 x 1536 | ||
Jpeg process: Baseline (Nikon Fine Compression) | ||
SHA-1 Hash: 3dcf29223076c4acae5108f6d2fa04cd1ddc5e70 |
The test program sent to me by Allume
is
a beta version and not the final product so things could change for the
commercial release. The test program they
sent was a single Windows executable (.exe) that is 118,784 bytes in
size and performs both compression and uncompression.
The executable itself is not compressed and UPX would bring it down to
about 53KB. A newer version of the
software (called b2 on this page) was sent to me and those results are
now included. This algorithm is now included in the Stuffit Deluxe 9 suite.
The test method used to show that the algorithm is real and no tricks were being used is described. I placed the compressor onto a floppy disk and copied the .exe file to Machine A and Machine B. Both machines have no way to communicate with each other and are not connected to any wired or wireless network. I used my Nikon Coolpix 3MP digital camera to generate JPEG files for use in the test. The three image files were copied to Machine A. They were not copied to and did not previously exist on Machine B. On Machine A, the SHA-1 hash of the 3 JPEG files were taken and the digests written down. The Allume software was used to individually compress the 3 JPEG files and sure enough they all got close to 30% compression. The compressed files only were copied to a floppy disk and then walked over to Machine B. They were then copied to Machine B and using the Allume executable already installed, the 3 JPEG files were uncompressed. The file sizes on Machine B matched the originals on Machine A which is a good start. The images were viewable in a JPEG reader as expected. Finally the SHA-1 hashes of the uncompressed files on Machine B were taken and confirmed to match the SHA-1 hashes of the original JPEG files on Machine A which means they are bit for bit identical. This is not a hoax, but the algorithm actually works.
The programs jpegtran, jpegoptim, jpeg-wizard2, and jpeg-ari all use "lossless" optimizations/transformations on the JPEG files and are therefore included in this test. Lossless in this case means that there is no loss of quality to the image but it is not possible to get back an identical (bit for bit) version of the original JPEG you started with. The other software in the test are true lossless compressors that can give back an identical uncompressed version of the JPEG you started with. The tests listed as "Allume + jpegtran" means the jpeg file was first optimized with jpegtran and then compressed with the Allume algorithm.
Legend
+ - New program tested
B - Best compression
(smallest compressed file)
F - Fastest compression time
Q - Quickest extraction time
ACT 2.0 JPEG Test | DSCN3974.jpg | |||||
Total Files Size (bytes): | 1,114,198 | |||||
Name | Switches |
Compress |
Extract |
Compressed |
Compress |
|
(seconds) |
(seconds) |
(bytes) |
(%) |
|||
B | Allume b2 + jpegtran | (none) |
7.8 |
7.9 |
825,554 |
25.9 |
Allume b2 + Jpegoptim | (none) |
7.7 |
8.1 |
832,133 |
25.3 |
|
Allume JPEG b2 | (none) |
7.9 |
8.1 |
832,139 |
25.3 |
|
Stuffit Deluxe 9.0.0.17 | JPEG smaller |
4.7 |
4.5 |
834,053 |
25.1 |
|
Stuffit Deluxe 9.0.0.17 | JPEG smaller + Thumbnails |
4.8 |
4.3 |
836,491 |
24.9 |
|
+ | packJPG 2.2 |
(none) |
4.1 |
4.2 |
873,261 |
21.6 |
Stuffit Deluxe 9.0.0.17 | JPEG fastest |
2.1 |
2.1 |
876,552 |
21.3 |
|
Stuffit Deluxe 9.0.0.17 | JPEG fastest + Thumbnails |
2.3 |
2.2 |
878,990 |
21.1 |
|
packJPG 1.9a |
(none) |
5.9 |
6.2 |
908,695 |
18.4 |
|
JPEG
Wizard 2.4 |
PIC
format |
0.7 |
N/A |
946,893 |
15.0 |
|
|
jpeg-ari 28mar98 | -arithmetic | 0.7 | 0.9 | 949,274 | 14.8 |
|
IJG jpegtran 6b | -optimize |
0.4 |
N/A |
1,082,948 |
2.8 |
|
Jpegoptim 1.2.2 | (none) |
1.3 |
N/A |
1,097,355 |
1.5 |
bzip2 1.02 | (none) |
1.6 |
0.5 |
1,101,627 |
1.1 |
|
7-Zip 3.13 | PPMd |
4.3 |
3.9 |
1,102,032 |
1.1 |
|
FQ | zip 2.3 | -9j |
0.2 |
0.1 |
1,104,866 |
0.8 |
rar 3.42 | -m5 |
1.7 |
0.1 |
1,107,336 |
0.6 |
|
7-Zip 3.13 | LZMA |
2.6 |
0.4 |
1,113,492 |
0.1 |
|
Best Compression: | Allume JPEG b2 | |||||
Fastest Compression: | zip 2.3 | |||||
Quickest Extraction: | zip 2.3 |
ACT 2.0 JPEG Test | DSCN4465.jpg | |||||
Total Files Size (bytes): | 694,895 | |||||
Name | Switches |
Compress |
Extract |
Compressed |
Compress |
|
(seconds) |
(seconds) |
(bytes) |
(%) |
|||
B |
Allume b2 + jpegtran | (none) |
5.7 |
5.8 |
518,046 |
25.4 |
Stuffit Deluxe 9.0.0.17 | JPEG smaller |
3.2 |
3.0 |
523,266 |
24.7 |
|
|
Allume b2 + Jpegoptim | (none) |
5.8 |
5.8 |
524,982 |
24.5 |
|
Allume JPEG b2 | (none) |
5.8 |
5.8 |
524,989 |
24.5 |
Stuffit Deluxe 9.0.0.17 | JPEG smaller + Thumbnails |
3.2 |
3.0 |
526,184 |
24.3 |
|
+ | packJPG 2.2 |
(none) |
3.0 |
3.0 |
560,531 |
19.3 |
Stuffit Deluxe 9.0.0.17 | JPEG fastest |
1.4 |
1.5 |
567,645 |
18.3 |
|
Stuffit Deluxe 9.0.0.17 | JPEG fastest + Thumbnails |
1.7 |
1.6 |
570,563 |
17.9 |
|
packJPG 1.9a |
(none) |
4.4 |
4.3 |
580,874 |
16.4 |
|
JPEG
Wizard 2.4 |
PIC
format |
0.8 |
N/A |
606,305 |
12.7 |
|
|
jpeg-ari 28mar98 | -arithmetic | 0.5 | 0.6 | 609,250 | 12.3 |
|
IJG jpegtran 6b | -optimize |
0.3 |
N/A |
674,756 |
2.9 |
bzip2 1.02 | (none) |
1.0 |
0.3 |
683,344 |
1.7 |
|
FQ | zip 2.3 | -9j |
0.1 |
0.1 |
683,462 |
1.6 |
rar 3.42 | -m5 |
1.2 |
0.1 |
685,283 |
1.4 |
|
7-Zip 3.13 | PPMd |
2.5 |
2.4 |
687,425 |
1.1 |
|
|
Jpegoptim 1.2.2 | (none) |
1.1 |
N/A |
689,163 |
0.8 |
7-Zip 3.13 | LZMA |
1.6 |
0.3 |
689,264 |
0.8 |
|
Best Compression: | Allume b2 + jpegtran | |||||
Fastest Compression: | zip 2.3 | |||||
Quickest Extraction: | zip 2.3 |
ACT 2.0 JPEG Test | DSCN5081.jpg | |||||
Total Files Size (bytes): | 516,726 | |||||
Name | Switches |
Compress |
Extract |
Compressed |
Compress |
|
(seconds) |
(seconds) |
(bytes) |
(%) |
|||
B | Allume b2 + jpegtran | (none) |
5.7 |
5.7 |
359,865 |
30.4 |
Allume b2 + Jpegoptim | (none) |
5.7 |
5.8 |
364,916 |
29.4 |
|
Allume JPEG b2 | (none) |
5.8 |
5.8 |
372,533 |
27.9 |
|
Stuffit Deluxe 9.0.0.17 | JPEG smaller |
2.9 |
2.4 |
373,637 |
27.7 |
|
Stuffit Deluxe 9.0.0.17 | JPEG smaller + Thumbnails |
3.0 |
2.6 |
376,270 |
27.2 |
|
+ | packJPG 2.2 |
(none) |
3.4 |
3.4 |
402,761 |
22.1 |
Stuffit Deluxe 9.0.0.17 | JPEG fastest |
1.5 |
1.4 |
407,978 |
21.0 |
|
Stuffit Deluxe 9.0.0.17 | JPEG fastest + Thumbnails |
1.4 |
1.5 |
410,611 |
20.5 |
|
packJPG 1.9a |
(none) |
4.7 |
4.9 |
422,389 |
18.3 |
|
JPEG
Wizard 2.4 |
PIC
format |
0.9 |
N/A |
453,745 |
12.2 |
|
jpeg-ari 28mar98 | -arithmetic | 0.4 | 0.5 | 455,181 | 11.9 | |
IJG jpegtran 6b | -optimize |
0.3 |
N/A |
482,661 |
6.6 |
|
Jpegoptim 1.2.2 | (none) |
2.4 |
N/A |
487,781 |
5.6 |
|
7-Zip 3.13 | PPMd |
2.0 |
1.8 |
504,718 |
2.3 |
|
Q | rar 3.42 | -m5 |
0.8 |
0.1 |
505,296 |
2.2 |
F | zip 2.3 | -9j |
0.1 |
0.1 |
505,334 |
2.2 |
bzip2 1.02 | (none) |
0.7 |
0.2 |
506,714 |
1.9 |
|
7-Zip 3.13 | LZMA |
1.2 |
0.2 |
508,449 |
1.6 |
|
Best Compression: | Allume JPEG b2 | |||||
Fastest Compression: | zip 2.3 | |||||
Quickest Extraction: | rar 3.42 |
Return to the ACT
Home Page.