Giter Site home page Giter Site logo

tiny-lz4-decoder's Introduction

Tiny lz4 decoding wrapper package built specifically for lod package manager and Unix systems. If you need complete box of lz4, consider using lz4.

Adding lib to the project

In your Cargo.toml:

[dependencies]
tiny-lz4-decoder-sys = "1.0"

In build.rs of your binary crate:

use std::{env, path::Path};

fn main() {
    let home_path = env::var("HOME").expect("HOME environment variable is not set.");
    let lz4_so = Path::new(&home_path).join(".local/share/tiny_lz4_decoder_sys");

    println!("cargo:rustc-link-arg=-Wl,-rpath={}", lz4_so.display());
}

Usage

Simple usage:

use std::fs::File;

use tiny_lz4_decoder_sys::Decoder;

fn main() {
    let input_file = File::open("compressed_lz4").unwrap();
    let mut decoder = Decoder::new(input_file).unwrap();
    let mut output_file = File::create("decompressed_output").unwrap();
    std::io::copy(&mut decoder, &mut output_file).unwrap();
}

License

This package is covered under the MIT license. See the LICENSE file for more info.

tiny-lz4-decoder's People

Contributors

onur-ozkan avatar

Stargazers

Érico Porto avatar Ivan Sotnikov avatar

Watchers

 avatar

tiny-lz4-decoder's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.