Expand description
§jmap
A Rust library for reading and writing Nintendo’s BCSV/JMap format This format is used by Super Mario Galaxy and some other games
§Quick Start
use lib_bcsv_jmap::{from_file, to_csv, smg_hash_table_with_lookup, IoOptions};
// Create a hash table with known field names
let hash_table = smg_hash_table_with_lookup("hashtable_smg.txt").unwrap();
// Read a BCSV file
let jmap = from_file(hash_table, "scenariodata.bcsv", &IoOptions::default()).unwrap();
// Print some data
println!("Entries: {}", jmap.len());
for entry in jmap.entries() {
if let Some(name) = entry.get_string(jmap.hash_table(), "ZoneName") {
println!("Zone: {}", name);
}
}
// Export to CSV
to_csv(&jmap, "output.csv", None).unwrap();§Features
- Read and write BCSV files with full format support
- big-endian and little-endian support
- Shift-JIS and UTF-8 string encoding
- CSV import/export
Re-exports§
pub use crate::csv::from_csv;pub use crate::csv::to_csv;pub use crate::entry::Entry;pub use crate::entry::FieldKey;pub use crate::error::JMapError;pub use crate::error::Result;pub use crate::field::Field;pub use crate::field::FieldType;pub use crate::field::FieldValue;pub use crate::hash::calc_hash;pub use crate::hash::FileHashTable;pub use crate::hash::HashAlgorithm;pub use crate::hash::HashTable;pub use crate::hash::smg_hash_table;pub use crate::hash::smg_hash_table_with_lookup;pub use crate::io::from_buffer;pub use crate::io::from_file;pub use crate::io::to_buffer;pub use crate::io::to_file;pub use crate::io::Encoding;pub use crate::io::IoOptions;pub use crate::jmap::JMapInfo;