Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

License

NotificationsYou must be signed in to change notification settings

plauth/lib842

Repository files navigation

Build Status

lib842 provides efficient, accelerated implementation of the 842 compression algorithm available from userspace. 842 is a compression algorithm by IBM, similar to LZ77, designed for very fast compression and decompression. Thus, it is suitable for cases such as compressed RAM (zram) or I/O link compression.

You can find more information about the algorithm, including a description of its implementation, in our publications:

Implementations

lib842 provides multiple implementations designed for different accelerators:

  • Asimple serial implementation for the CPU intended to serve as a reference. This implementation is a port of the reference implementation available in themainline Linux kernel.

  • Anoptimized serial implementation for the CPU designed to achieve high compression/decompression speeds.

  • AOpenCL implementation for OpenCL-capable GPUs designed to achieve high decompression speeds.

  • ACUDA implementation for CUDA-capable GPUs designed to achieve high decompression speeds.

  • Acryptodev implementation that allows using the dedicated hardware compressor on IBM POWER7+ hardware.

Currently, thesimple serial,optimized serial andcryptodev implementations support both compression and decompression, while theOpenCL andCUDA implementations support decompression only.

Requisites

CMake is required in order to execute the build process.

Thesimple serial andoptimized serial implementations can be built and used on any machine with a modern C/C++ compiler. However,OpenMP is needed in order to enable parallel (multithreaded) compression on the CPU.

Thecryptodev implementation requires building, installing and loading ourmodified cryptodev kernel module with compression support. On IBM POWER7+ hardware, the dedicated hardware compressor will be automatically used. Otherwise, the Linux kernel will fall back to a non-accelerated implementation.

TheOpenCL andCUDA implementations require a working OpenCL or CUDA environment respectively.

Getting started

First off, make sure to clone the repository including its submodules (git clone --recurse-submodules) in order to pull all required dependencies.

To build lib842, type the following in a shell on the root of the cloned repository:

mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release .. && make -j$(nproc)

After a successful compilation, at least thesimple serial andoptimized serial implementations will be compiled. You can test compression and decompression by executing one of the samples:

./test_serial /path/to/my/file./test_serial_optimized /path/to/my/file

Other implementations will be automatically built if the required dependencies are supported. The build process should provide suitable output to determine which implementations are built or not and why.

You can also verify the implementations are working correctly on your hardware by running the unit tests using thectest command (included with CMake) after a successful build.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors2

  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp