Crates.io | jagged |
lib.rs | jagged |
version | 0.2.0 |
source | src |
created_at | 2020-03-25 20:04:59.792879 |
updated_at | 2020-06-07 17:55:07.864307 |
description | jagged provides an API to read data entries from JAG archives. |
homepage | |
repository | https://github.com/hikilaka/jagged |
max_upload_size | |
id | 222761 |
size | 90,421 |
Jagged provides an API to read/write data entries to/from JAG archives.
Documentation is hosted at docs.rs. It is somewhat incomplete as the library is still unstable.
use anyhow::Result;
use jagged::{Archive, ReadWriteArchive};
use std::path::Path;
fn main() -> Result<()> {
let mut archive = Archive::new();
let data: Vec<u8> = include_bytes!("some_file").to_vec();
let output_path = Path::new("archive.jag")?;
let _ = archive.insert("some_name", data);
archive.save(output_path)?;
}
For more examples see the examples directory of this repository.
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see http://www.gnu.org/licenses/.