Skip to content

Commit

Permalink
Merge branch 'maintenance/prepare-release'
Browse files Browse the repository at this point in the history
  • Loading branch information
azriel91 committed Sep 22, 2020
2 parents 15f1bee + 0644ea4 commit a5ec041
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 15 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
@@ -1,13 +1,13 @@
[package]
name = "lf2_codec"
version = "0.1.0"
version = "0.2.0"
authors = ["Azriel Hoh <azriel91@gmail.com>"]
description = "Encodes and decodes Little Fighter 2 (LF2) data files"
documentation = "https://docs.rs/lf2_codec"
edition = "2018"
homepage = "https://github.com/azriel91/lf2_codec"
keywords = ["lf2"]
license = "MIT OR Apache-2.0"
license = "Zlib"
maintenance = { status = "passively-maintained" }
readme = "README.md"
repository = "https://github.com/azriel91/lf2_codec"
11 changes: 11 additions & 0 deletions LICENSE-ZLIB.md
@@ -0,0 +1,11 @@
Copyright (c) 2020 Azriel Hoh.

This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.

Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:

1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.

2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.

3. This notice may not be removed or altered from any source distribution.
37 changes: 24 additions & 13 deletions README.md
@@ -1,33 +1,44 @@
[![docs](https://docs.rs/lf2_codec/badge.svg)](https://docs.rs/lf2_codec)
[![crates.io](https://img.shields.io/crates/v/lf2_codec.svg)](https://crates.io/crates/lf2_codec)

# LF2 Codec

Encodes and decodes Little Fighter 2 (LF2) data files.

## Usage

LF2 codec can be used as an application or a library.

### Application

```sh
# Installation
cargo install lf2_codec

# Running
lf2_codec decode character.dat > character.txt
lf2_codec encode character.txt > character.dat
```

### Library

```rust
use lf2_codec::DataDecoder;

let character_dat_reader = BufReader::new(File::open("character.dat")?);
let decoded_bytes = DataDecoder::decode_path("character.dat")?;
// or
// let character_dat_reader = BufReader::new(File::open("character.dat")?);
// let decoded_bytes = DataDecoder::decode(character_dat_reader)?;

let decoded_bytes = DataDecoder::decode(character_dat_reader)?;
let decoded = String::from_utf8(decoded_bytes)?;

println!("{}", decoded);
```

### Binary
## License

```
cargo run --release -- character.dat > character.txt
```
Licensed the [Zlib license](LICENSE-Zlib.md).

## Development
### Contribution

```bash
git clone git@github.com:azriel91/lf2_codec.git
git switch -c feature/nnn/short-description # e.g. feature/123/implement-something

# open a PR
```
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you shall be licensed as above, without any additional terms or conditions.

0 comments on commit a5ec041

Please sign in to comment.