Crates.io | bsa3-hash |
lib.rs | bsa3-hash |
version | 3.0.0 |
source | src |
created_at | 2019-05-26 01:30:00.610185 |
updated_at | 2021-11-14 05:39:08.45046 |
description | The hash function used in BSA files for *The Elder Scrolls III: Morrowind*. |
homepage | |
repository | https://github.com/FaultyRAM/bsa3-hash |
max_upload_size | |
id | 137045 |
size | 976,115 |
bsa3-hash provides a Rust implementation of the hash function used in BSA files for The Elder Scrolls III: Morrowind.
Add bsa3-hash to your Cargo.toml
:
[dependencies]
bsa3-hash = "^3.0.0"
Then call bsa3_hash::calculate
as needed:
fn main() {
assert_eq!(
bsa3_hash::calculate(r"meshes\m\probe_journeyman_01.nif".as_bytes()),
0x0002_0336, 0xBB50_0695
);
}
bsa3-hash supports benchmarking via criterion. Currently we test and benchmark against three data sets: the filename/hash lists from Morrowind.bsa, Tribunal.bsa and Bloodmoon.bsa. To run the benchmarks, simply do the following:
cargo install cargo-criterion
cargo criterion
Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.