Skip to content

Files

Latest commit

 

History

History

minigzip

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
Minigzip for Sony-Toshiba-IBM Cell Broadband Engine (or Cell
processor) is a file compression/decompression utility similar to gzip
(http://www.gzip.org). Minigzip, provided here is programmed using
zlib library optimized for Cell Processor. Zlib, a data
compression/decompression library, was originally written by Jean-loup
Gailly and Mark Adler ( http://www.zlib.net). While zlib is heavily
optimized for sequential execution environment, additional effort is
required to exploit Cell processor's unique architecture.

Zlib library is optimized for Cell processor by Seunghwa Kang and
David A. Bader, and minigzip is provided as an example application to
demonstrate the performance of Cell optimized zlib library.

Two compiled binary executables and source code for both minigzip
application and zlib library are uploaded in GitHub. The difference
between two pre-compiled binary executables minigzip and
minigzip_no_sdk is following.

minigzip uses spe_count_physical_spes() function to get the number of
available SPEs. However, spe_count_physical_spes() is included in the
run-time library and if Cell SDK is not installed, this run-time
library may not available.

minigzip_no_sdk, which statically assumes there are eight available
SPEs, can be used in this case. Still, it is important to know that as
it assumes there are eight SPEs, it may not work properly on Sony
PlayStation 3 because Sony PlayStation 3 has only six available SPEs.

Following is the usage of minigzip program. By default, minigzip uses
all available SPEs and 900KB block size.

minigzip [-1 to -9] [-d] [-r] [-h] [-f] [-t1 to -t8] [-b0 to -b9] [file name]

-1 to -9
Set the compression level. Use -1 for the fastest compression, but the
worst compression ratio and -9 for the slowest compression but the
best compression ratio. This option is disregarded for decompression.

-d
Decompress the file.

-r
Use RLE (Run Length Encoding) instead of LZ77. This option is
disregarded for decompression.

-h
Use Huffman coding only. This option is disregarded for decompression.

-f
Set filtered mode. Do not encode the matched string less than 5 bytes
to (length, distance) pair. Default is 3 bytes. This option is
disregarded for decompression.

-t1 to -t8
Set maximum number of SPE threads to use. If block size is set to
zero(look for -b0 to -b9), only a single thread is used for
compression regardless of this option. Similarly, if a target file is
compiled without block size set, only a single thread is used for
decompression. Also, if the total number of blocks is smaller than the
number of threads, only the number of threads equal to the number of
blocks are used.

-b0 to -b9
Set block size from 100KB(-b1) to 900KB(-b9) or 0. 100KB to 900KB
block size range is same as bzip2. Setting block size to small value
benefits in load balancing between multiple SPE threads but increases
compressed file size. Larger block size benefits in compression ratio,
but could cause load imbalance, especially for small size files. If
size is set to 0, then the whole input file will be compressed as a
single block. We can achieve best compression ratio with this option,
but only a single SPE will be used for compression. This option is
disregarded for decompression.