| Crates.io | bestdori-noteskin |
| lib.rs | bestdori-noteskin |
| version | 0.2.0 |
| created_at | 2025-12-20 12:26:55.360375+00 |
| updated_at | 2025-12-31 14:31:41.829512+00 |
| description | Bestdori noteskin 包的解包/打包与 FFI 支持 |
| homepage | https://github.com/bestdori-noteskin/bestdori-noteskin |
| repository | https://github.com/bestdori-noteskin/bestdori-noteskin |
| max_upload_size | |
| id | 1996449 |
| size | 31,614 |
Bestdori .noteskin 包的解包库、FFI、以及打包 CLI 工具。
.noteskin 自定义包(头含 NSPK + 版本 + 类型 + 数量,索引含名称/偏移/长度,数据为 PNG 字节),解码为 RgbaImage 组合。noteskin_decode(path, out_buf, out_len, out_written, err_buf, err_len),返回一次性打包的 RGBA 序列,错误写入 err_buf。manifest.toml 校验文件存在、PNG 头、重复键,生成 .noteskin。CLI 名称 bestdori-noteskin-packer。use bestdori_noteskin::decode_noteskin;
let bundle = decode_noteskin("skin00_rip.noteskin")?;
for img in bundle.images {
println!("{}: {}x{}", img.key, img.image.width(), img.image.height());
}
// noteskin_decode(path, out_buf, out_len, out_written, err_buf, err_len)
// out_buf 需足够大;out_written 返回实际写入字节;错误消息写入 err_buf(英文)。