#buffer #osrs #runescape

osrs-buffer

A buffer for the data types in Oldschool Runescape

8 releases (breaking)

0.7.0 Dec 31, 2022
0.6.0 May 24, 2022
0.5.0 Mar 6, 2022
0.4.0 Feb 16, 2022
0.0.0 Dec 27, 2021

#764 in Development tools

Download history 4/week @ 2024-02-21 11/week @ 2024-02-28 17/week @ 2024-03-27 34/week @ 2024-04-03

51 downloads per month

MIT license

25KB
235 lines

osrs-buffer

Build API Crate dependency status Discord

A buffer for Oldschool Runescape data types.

Deprecated

This crate has been deprecated in favor of osrs-bytes. osrs-buffer will not be updated anymore.

Installation

Add this crate as a dependency to your Cargo.toml file.

[dependencies]
osrs-buffer = "0.7.0"

Example

use osrs_buffer::{ReadExt, WriteExt};
use std::io::{self, Cursor};

fn main() -> Result<(), io::Error> {
    // Read data from the cursor
    let mut csr = Cursor::new(vec![123]);
    assert_eq!(csr.read_i8()?, 123);

    // Write data to the vector
    let mut vec = Vec::new();
    vec.write_i8(124)?;
    assert_eq!(vec[0], 124);

    Ok(())
}

License

This project is licensed under the MIT license.

Contributing

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in osrs-buffer by you, shall be licensed as MIT, without any additional terms or conditions.

No runtime deps