mirror of https://github.com/encounter/nod-rs.git
Release 0.1.0
This commit is contained in:
parent
d7279f50de
commit
1e60c551e1
|
@ -10,14 +10,13 @@ readme = "README.md"
|
|||
description = """
|
||||
Rust library and CLI tool for reading GameCube and Wii disc images.
|
||||
"""
|
||||
keywords = ["gamecube", "wii", "iso", "nfs", "gcm"]
|
||||
categories = ["command-line-utilities", "parser-implementations"]
|
||||
|
||||
[[bin]]
|
||||
name = "nodtool"
|
||||
path = "src/bin.rs"
|
||||
|
||||
[profile.release]
|
||||
lto = true
|
||||
|
||||
[dependencies]
|
||||
aes = "0.7.4"
|
||||
binread = "2.1.1"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# nod-rs [![Build Status]][actions] [![Latest Version]][crates.io] [![Api Rustdoc]][rustdoc] [![Rust](https://img.shields.io/badge/rust-1.51%2B-blue.svg?maxAge=3600)](https://github.com/eqrion/cbindgen)
|
||||
# nod-rs [![Build Status]][actions] [![Latest Version]][crates.io] [![Api Rustdoc]][rustdoc] [![Rust](https://img.shields.io/badge/rust-1.51%2B-blue.svg?maxAge=3600)](https://github.com/encounter/nod-rs)
|
||||
|
||||
[Build Status]: https://github.com/encounter/nod-rs/workflows/build/badge.svg
|
||||
[actions]: https://github.com/encounter/nod-rs/actions
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
use std::{env, fs, io};
|
||||
use std::io::BufWriter;
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::time::Instant;
|
||||
|
||||
use clap::{AppSettings, clap_app};
|
||||
use file_size;
|
||||
|
@ -67,13 +66,10 @@ fn extract_node(node: &NodeType, partition: &mut dyn PartReadStream, base_path:
|
|||
NodeType::File(v) => {
|
||||
let mut file_path = base_path.to_owned();
|
||||
file_path.push(v.name.as_ref());
|
||||
print!("Extracted {}", file_path.to_string_lossy());
|
||||
let now = Instant::now();
|
||||
println!("Extracting {} (size: {})", file_path.to_string_lossy(), file_size::fit_4(v.length as u64));
|
||||
let file = fs::File::create(file_path)?;
|
||||
let mut buf_writer = BufWriter::with_capacity(partition.ideal_buffer_size(), file);
|
||||
io::copy(&mut partition.begin_file_stream(v)?, &mut buf_writer)?;
|
||||
let elapsed = now.elapsed();
|
||||
println!(" (time: {:.2?}, size: {})", elapsed, file_size::fit_4(v.length as u64));
|
||||
}
|
||||
NodeType::Directory(v, c) => {
|
||||
if v.name.is_empty() {
|
||||
|
|
Loading…
Reference in New Issue