
MARS zlib sample

Copyright (C) 2008 Sony Computer Entertainment Inc.


What is this?
=============

     This is zlib library partially ported on MARS (Multicore Application
   Runtime System) which is intended to be a reference of porting existing
   libraries on MARS. Any PPE programs uses zlib can take advantage of SPEs
   by utilizing MARS task in this MARS ported zlib. Only the compression
   routine is ported on MARS task and the decompression uses original PPE
   routine.
     The package includes modified mgzip which operates on top of the
   MARS ported zlib. The mgzip is a program to compress files faster into the
   gzip file format that make use of multi processors by generating many
   instance of zlib. The combination of MARS ported zlib and modified mgzip
   will compress files much faster by utilizing many SPEs in Cell Broadband
   Engine (Cell/B.E.).

Compiling
=========

1. Setup the development environment for Cell/B.E.

   * ppu-gcc and ppu-binutils (PPU toolchain)
   * spu-gcc, spu-binutils and spu-newlib (SPU toolchain)
   * libspe2 (SPE runtime management library)
   * MARS

2. Build the MARS ported zlib and mgzip.

   Type "make" in this directory. The original zlib and mgzip source codes will
   be downloaded during the building process automatically. The MARS ported
   libz.a will be created in zlib-1.2.3 directory and also mgzip in
   smp_mgzip_1.2c directory.

   (To make 32-bit binary)
   $ make HOST_FLAG=-m32

   (To make 64-bit binary)
   $ make HOST_FLAG=-m64

3. (Optional) Build the MARS ported zlib as a shared library.

   $ cd zlib-1.2.3
   $ make libz.so.1.2.3


How to use mgzip
================

See smp_mgzip_1.2c/README.


Limitations
===========

 * This MARS ported zlib does not support following functions.
      - deflateSetDictionary
      - deflatePrime
      - deflateParams
      - deflateTune
      - deflateBound
      - deflateCopy

ChangeLog
=========

* 0.2.5
- change for task compatibility with mars-1.1.2.

* 0.2.4
- change to be able to build with mars-1.1.1.
- improve compression rate.

* 0.2.3
- change to be able to build with mars-1.1.0.
- improve compression rate.

* 0.2.2
- change to be able to build with mars-1.0.1.

* 0.2.1
- adjust the MARS API change for partial context switch.

* 0.2
- adjust the MARS API changes for dynamic allocations.

* 0.1.1
- support to switch 32bit/64bit binary by a make option.

* 0.1
- initial version
