libbz2-rs-sys 0.1.1

a drop-in compatible rust bzip2 implementation
Documentation
![checks](https://github.com/trifectatechfoundation/libbzip2-rs/actions/workflows/checks.yaml/badge.svg?branch=main)
[![codecov](https://codecov.io/gh/trifectatechfoundation/libbzip2-rs/graph/badge.svg?token=Lqtmehzxm0)](https://codecov.io/gh/trifectatechfoundation/libbzip2-rs)
[![Crates.io](https://img.shields.io/crates/v/libbz2-rs-sys.svg)](https://crates.io/crates/libbzip2-rs-sys)


# libbzip2-rs: a safer libbzip

This repository contains a Rust implementation of the bzip2 file format that is compatible with the libbzip2 API.

This repository contains the following public crate:

* [libbz2-rs-sys]https://crates.io/crates/libbz2-rs-sys/, a libbzip2-compatible C API.

## How to use libbzip2-rs in your project

libbzip2-rs can be used in both Rust and C projects.

### Rust projects

<!--
FIXME uncomment the following text once https://github.com/alexcrichton/bzip2-rs/pull/110 lands.
By far the easiest way to use libbzip2-rs is through the [bzip2-rs](https://crates.io/crates/bzip2-rs) crate, by simply enabling the `libbz2-rs-sys` feature gate. This will enable the `libbz2-rs-sys`
backend.
-->

For the time being using the C api exported by the `libbz2-rs-sys` crate is the only way to use it from Rust. There is an [open PR](https://github.com/alexcrichton/bzip2-rs/pull/110) for the [bzip2-rs](https://crates.io/crates/bzip2-rs) crate to make usage significantly easier.

## C projects

libbzip2-rs can be built as a shared object file for usage by C programs that dynamically link to libbzip2. Please see the example in [libbz2-rs-sys-cdylib](https://github.com/trifectatechfoundation/libbzip2-rs/tree/main/libbz2-rs-sys-cdylib).

## Acknowledgment

This project is based on a [c2rust](https://github.com/immunant/c2rust) translation of the original [libbzip2](https://sourceware.org/bzip2/).

## About

libbzip2-rs is part of Trifecta Tech Foundation's [Data compression initiative](https://trifectatech.org/initiatives/data-compression/).