How To Install bitshuffle on Ubuntu 22.04

Hostnbit

In this tutorial we learn how to install bitshuffle on Ubuntu 22.04. bitshuffle is filter for improving compression of typed binary data

Introduction

In this tutorial we learn how to install bitshuffle on Ubuntu 22.04.

What is bitshuffle

bitshuffle is:

Bitshuffle is an algorithm that rearranges typed, binary data for
improving compression, as well as a python/C package that implements
this algorithm within the Numpy framework.

The library can be used along side HDF5 to compress and decompress
datasets and is integrated through the dynamically loaded filters
framework. Bitshuffle is HDF5 filter number 32008.

Algorithmically, Bitshuffle is closely related to HDF5’s Shuffle
filter except it operates at the bit level instead of the byte level.
Arranging a typed data array in to a matrix with the elements as the
rows and the bits within the elements as the columns, Bitshuffle
“transposes” the matrix, such that all the least-significant-bits
are in a row, etc. This transpose is performed within blocks of
data roughly 8kB long.

This does not in itself compress data, only rearranges it for more
efficient compression. To perform the actual compression you will
need a compression library. Bitshuffle has been designed to be well
matched Marc Lehmann’s LZF as well as LZ4. Note that because
Bitshuffle modifies the data at the bit level, sophisticated entropy
reducing compression libraries such as GZIP and BZIP are unlikely to
achieve significantly better compression than simpler and faster
duplicate-string-elimination algorithms such as LZF and LZ4.
Bitshuffle thus includes routines (and HDF5 filter options) to apply
LZ4 compression to each block after shuffling.

The Bitshuffle algorithm relies on neighbouring elements of a dataset
being highly correlated to improve data compression. Any correlations
that span at least 24 elements of the dataset may be exploited to
improve compression.

There are three methods to install bitshuffle on Ubuntu 22.04. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install bitshuffle Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install bitshuffle using apt-get by running the following command:

sudo apt-get -y install bitshuffle

Install bitshuffle Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install bitshuffle using apt by running the following command:

sudo apt -y install bitshuffle

Install bitshuffle Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install bitshuffle using aptitude by running the following command:

sudo aptitude -y install bitshuffle

How To Uninstall bitshuffle on Ubuntu 22.04

To uninstall only the bitshuffle package we can use the following command:

sudo apt-get remove bitshuffle

Uninstall bitshuffle And Its Dependencies

To uninstall bitshuffle and its dependencies that are no longer needed by Ubuntu 22.04, we can use the command below:

sudo apt-get -y autoremove bitshuffle

Remove bitshuffle Configurations and Data

To remove bitshuffle configuration and data from Ubuntu 22.04 we can use the following command:

sudo apt-get -y purge bitshuffle

Remove bitshuffle configuration, data, and all of its dependencies

We can use the following command to remove bitshuffle configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge bitshuffle

References

AdvertisementsEzoicreport this ad

Summary

In this tutorial we learn how to install bitshuffle package on Ubuntu 22.04 using different package management tools: apt, apt-get and aptitude.

Hostnbit

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Menu Title
Scroll to Top