Intel® Integrated Performance Primitives
Ipp_bzip2 Interface for Linux*

License Definitions
Overview
System Requirements
Package Contents
How to Build Source Code
Running the Interface
Technical Support and Feedback
Disclaimer


License Definitions

By downloading and installing this sample, you hereby agree that the accompanying Materials are being provided to you under the terms and conditions of the End User License Agreement for the Intel® Integrated Performance Primitives product previously accepted by you. Please refer to the file ippEULA.rtf or ippEULA.txt located in the root directory of your Intel® IPP product installation for more information.

Overview

The ipp_bzip2 interface demonstrates how to use the Intel® Integrated Performance Primitives (Intel® IPP) Data Compression domain functions for the implementation of bzip2/libbzip2 (a program and library for lossless, block-sorting data compression. Additional information on this product can be obtained here: www.bzip.org) over them. The interface contains patched source codes of bzip2/libbzip2 and makefiles for building the ipp_bzip utility and the libipp_bz2.a library. The libipp_bz2.a library has the same API as the last version libbz2.a and can be linked to customer's application for performance improvement instead of original libbz2.a.

Additional information on this software as well as other Intel software performance products is available at http://www.intel.com/software/products/.

System Requirements

Recommended hardware: Hardware requirements: Software requirements:

Package Contents

The Intel ® IPP Ipp_bzip2 for Linux* Interface package contains the following files:

.\interfaces\
ippEULA.rtf End User License Agreement
support.txt Contains technical support information
.\interfaces\data-compression\ipp_bzip2\
readme.htm This file
Makefile Makefile for the ipp_bzip2 interface
build_ia32.sh, build_intel64.sh Scropts for building the ipp_bzip2 interface
.\interfaces\data-compression\ipp_bzip2\src\
blocksort.c, bzip2.c, bzlib.h, bzlib_private.h, compress.c, crctable.c, decompress.c, huffman.c, LICENSE, randtable.c Unchanged bzip2/libbzip2 source codes
bzlib.c Changed libbzip2 source code. Names of rewritten functions have been changed to include suffix "1"
ipp_bzlib.c, ipp_static.cpp Source code with implementation of libbzip2 API over corresponding Intel® IPP data compression primitives

How to Build Source Code

Running the Interface

To run each executable created by this interface, the Intel® IPP shared libraries must be on the system's path. Shared libraries are located in  the "sharedlib"  subdirectory of the root directory of the Intel® IPP installation (IPPROOT). This can be done by setting the DYLD_LIBRARY_PATH environment variable manually or by invoking the batch file: "$IPPROOT/tools/env/ippvars32.sh" from the Intel® IPP installation.

When built, ipp_bzip2 interface contains one executable file: ipp _bzip2 . This file can be used for compression and decompression files. Files which were not created by bzip2 or ipp_bzip2 will be detected and ignored, and a warning will be issued. If no files are listed, then standard input and output are used.
Without command line arguments, the executable file only produces the next lines:

ipp_bzip2: I won't write compressed data to a terminal.
ipp_bzip2: For help, type: `ipp_bzip2 --help'.

To provide the proper functionality, the command-line arguments should be used. Type " ipp_bzip2 -h " for information about usage and meaning of options on the command line:

bzip2, a block-sorting file compressor. Version 1.0.4, 20-Dec-2006.

usage: ipp_bzip2 [flags and input files in any order]

-h --help print this message
-d --decompress force decompression
-z --compress force compression
-k --keep keep (don't delete) input files
-f --force overwrite existing output files
-t --test test compressed file integrity
-c --stdout output to standard out
-q --quiet suppress noncritical error messages
-v --verbose be verbose (a 2nd -v gives more)
-L --license display software version & license
-V --version display software version & license
-s --small use less memory (at most 2500k)
-1 .. -9 set block size to 100k .. 900k
--fast alias for -1
--best alias for -9

If invoked as `bzip2', default action is to compress.
as `bunzip2', default action is to decompress.
as `bzcat', default action is to decompress to stdout.

If no file names are given, bzip2 compresses or decompresses
from standard input to standard output. You can combine
short flags, so `-v -4' means the same as -v4 or -4v, &c.


The ipp_bzip2 interface understands the following options:

Option: Purpose:
-c --stdout Compress or decompress to standard output.
-d --decompress Force decompression.
-z --compress The complement to -d: forces compression, regardless of the invocation name.
-t --test Check integrity of the specified file(s), but don't decompress them. This really performs a trial decompression and throws away the result.
-f --force Force overwrite of output files. Normally, bzip2 will not overwrite existing output files. Also forces bzip2 to break hard links to files, which it otherwise wouldn't do.
The bzip2 normally declines to decompress files which don't have the correct magic header bytes. If forced (-f), however, it will pass such files through unmodified.
-k --keep Keep (don't delete) input files during compression or decompression.
-s --small Reduce memory usage, for compression, decompression and testing.
-q --quiet Suppress non-essential warning messages. Messages pertaining to I/O errors and other critical events will not be suppressed.
-v --verbose Verbose mode -- show the compression ratio for each file processed. Further -v's increase the verbosity level, spewing out lots of information which is primarily of interest for diagnostic purposes.
-L --license -V --version Display the software version, license terms and conditions.
-1 (or --fast) to -9 (or --best) Set the block size to 100 k, 200 k .. 900 k when compressing. Has no effect when decompressing. The --fast and --best aliases are primarily for GNU gzip compatibility. In particular, --fast doesn't make things significantly faster. And --best merely selects the default behavior.
-- Treats all subsequent arguments as file names even if they start with a dash, which helps you handle files with names beginning with a dash, for example:
bzip2 -- -myfilename.

Example of usage command line arguments:

1). Compression of "text.txt" file: ipp_bzip2 text.txt

2). Decompression of "text.bz2" file: ipp_bzip2 -d text.bz2

Technical Support and Feedback

To receive support or provide feedback refer to the "Technical Support and Feedback" section of the release notes (ReleaseNotes.htm) provided in the Intel® IPP product installation.

Your feedback on the Intel IPP samples is very important to us and your input will be considered for future releases. The Intel IPP sample code is intended only as an example of how to use the APIs to implement algorithms in different development environments. Please submit problems with installation, compiling, linking, runtime errors or incorrect output to Intel® Premier Support.

You can also share and discuss the experience of IPP sample usage with other developers at Intel Software Developer Forum.

Optimization Notice

The Intel® Integrated Performance Primitives (Intel® IPP) library contains functions that are more highly optimized for Intel microprocessors than for other microprocessors. While the functions in the Intel® IPP library offer optimizations for both Intel and Intel-compatible microprocessors, depending on your code and other factors, you will likely get extra performance on Intel microprocessors.

While the paragraph above describes the basic optimization approach for the Intel® IPP library as a whole, the library may or may not be optimized to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include Intel® Streaming SIMD Extensions 2 (Intel® SSE2), Intel® Streaming SIMD Extensions 3 (Intel® SSE3), and Supplemental Streaming SIMD Extensions 3 (Intel® SSSE3) instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors.

Intel recommends that you evaluate other library products to determine which best meets your requirements.

Disclaimer

INFORMATION IN THIS DOCUMENT IS PROVIDED IN CONNECTION WITH INTEL PRODUCTS. NO LICENSE, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, TO ANY INTELLECTUAL PROPERTY RIGHTS IS GRANTED BY THIS DOCUMENT. EXCEPT AS PROVIDED IN INTEL'S TERMS AND CONDITIONS OF SALE FOR SUCH PRODUCTS, INTEL ASSUMES NO LIABILITY WHATSOEVER, AND INTEL DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY, RELATING TO SALE AND/OR USE OF INTEL PRODUCTS INCLUDING LIABILITY OR WARRANTIES RELATING TO FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR INFRINGEMENT OF ANY PATENT, COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT.
UNLESS OTHERWISE AGREED IN WRITING BY INTEL, THE INTEL PRODUCTS ARE NOT DESIGNED NOR INTENDED FOR ANY APPLICATION IN WHICH THE FAILURE OF THE INTEL PRODUCT COULD CREATE A SITUATION WHERE PERSONAL INJURY OR DEATH MAY OCCUR.

Intel may make changes to specifications and product descriptions at any time, without notice. Designers must not rely on the absence or characteristics of any features or instructions marked "reserved" or "undefined." Intel reserves these for future definition and shall have no responsibility whatsoever for conflicts or incompatibilities arising from future changes to them. The information here is subject to change without notice. Do not finalize a design with this information.
The products described in this document may contain design defects or errors known as errata which may cause the product to deviate from published specifications. Current characterized errata are available on request.
Contact your local Intel sales office or your distributor to obtain the latest specifications and before placing your product order.
Copies of documents which have an order number and are referenced in this document, or other Intel literature, may be obtained by calling 1-800-548-4725, or go to: http://www.intel.com/#/en_US_01
Intel processor numbers are not a measure of performance. Processor numbers differentiate features within each processor family, not across different processor families. See http://www.intel.com/products/processor_number for details.

BunnyPeople, Celeron, Celeron Inside, Centrino, Centrino Inside, Core Inside, i960, Intel, the Intel logo, Intel Atom, Intel Atom Inside, Intel Core, Intel Inside, Intel Inside logo, Intel NetBurst, Intel NetMerge, Intel NetStructure, Intel SingleDriver, Intel SpeedStep, Intel Sponsors of Tomorrow., the Intel Sponsors of Tomorrow. logo, Intel StrataFlash, Intel Viiv, Intel vPro, Intel XScale, InTru, the InTru logo, InTru soundmark, Itanium, Itanium Inside, MCS, MMX, Moblin, Pentium, Pentium Inside, skoool, the skoool logo, Sound Mark, The Journey Inside, vPro Inside, VTune, Xeon, and Xeon Inside are trademarks of Intel Corporation in the U.S. and other countries.
* Other names and brands may be claimed as the property of others.

Microsoft, Windows, Visual Studio, Visual C++, and the Windows logo are trademarks, or registered trademarks of Microsoft Corporation in the United States and/or other countries.