3rd-party/tbb/examples/graph/fgbzip2/readme.html
fgbzip2 is a parallel implementation of bzip2 block-sorting file compressor that uses tbb::flow. The output of this application is fully compatible with bzip2 v1.0.6 or newer.
This example includes software developed by Julian R Seward. See here for copyright information.
It exemplifies support for asynchronous capabilities in the flow graph API, in particular async_node and async_msg.
This example uses C++11 lambda expressions. Specifying a compiler option such as -std=c++11 or similar might be necessary in order to build the example. For more information please refer to the documentation for the compiler you use.
System Requirements
For the most up to date system requirements, see the release notes.
Files
fgbzip2.cppFlow Graph implementation of bzip2 compressor. blocksort.cppBlock sorting machinery of libbzip2. bzlib.cpplibbzip2 top-level functions. bzlib.hPublic header file for the libbzip2. bzlib_private.hPrivate header file for the libbzip2. compress.cppCompression machinery of libbzip2. crctable.cpplibbzip2 table for doing CRCs. decompress.cppDecompression machinery of libbzip2. huffman.cppHuffman coding low-level stuff of libbzip2. randtable.cpplibbzip2 table for randomising repetitive blocks. MakefileMakefile for building the example.
Directories
msvsContains Microsoft* Visual Studio* workspace for building and running the example (Windows* systems only). xcodeContains Xcode* IDE workspace for building and running the example (macOS* systems only).
For information about the minimum supported version of IDE, see release notes.
Build instructions
General build directions can be found here.
Usage
fgbzip2 -h_Prints the help for command line options fgbzip2 [-b_=value] [-v] [-l=value] [-a=value] [filename]-b block size in 100 KB chunks, [1 .. 9]
-v print diagnostic output to screen
-l used memory limit for compression algorithm with 1 MB (minimum) granularity
-a name of the used graph async realization - can be async_node or async_msg
filename name of the file to compress
To run a short version of this example, e.g., for use with Intel® Parallel Inspector: Build a debug version of the example (see the build instructions).
Run it with a small problem size, e.g., fgbzip2 -b=1 -a fgbzip2.
Legal Information
Intel and the Intel logo are trademarks of Intel Corporation in the U.S. and/or other countries.
* Other names and brands may be claimed as the property of others.
© 2020, Intel Corporation
The "libbzip2" sources for this example is Copyright (c) 1996-2010 Julian R Seward. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.