You can install by Cargo.
shell
cargo install ncmdump
shell
ncmdump [FILES]...
```text Usage: ncmdump [OPTIONS] [FILES]...
Arguments: [FILES]... Specified the files to convert
Options: -o, --output
You can add this to your Cargo.toml
:
toml
ncmdump = "0.5.0"
Also, you can use this command to install this crate, if you installed cargo-edit
shell
cargo add ncmdump
```rust use std::fs::File; use std::path::Path;
use anyhow::Result; use ncmdump::Ncmdump;
fn main() -> Result<()> { use std::io::Write; let file = File::open("tests/test.ncm")?; let mut ncm = Ncmdump::fromreader(file)?; let music = ncm.getdata()?; let mut target = File::options() .create(true) .write(true) .open("tests/test.flac")?; target.write_all(&music)?; Ok(()) } ```
For more usage, please check the document.