diff --git a/Cargo.toml b/Cargo.toml index e2b75224..4a67c165 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,7 +26,7 @@ io_ply = ["ply-rs"] bevy-inspector-egui = "0.21" bevy_panorbit_camera = "0.9" bincode2 = { version = "2.0", optional = true } -byte-unit = "4.0" +byte-unit = "5.0.3" bytemuck = "1.14" flate2 = { version = "1.0", optional = true } flexbuffers = { version = "2.0", optional = true } diff --git a/tools/ply_to_gcloud.rs b/tools/ply_to_gcloud.rs index 11c381d1..3f3cbedd 100644 --- a/tools/ply_to_gcloud.rs +++ b/tools/ply_to_gcloud.rs @@ -1,6 +1,9 @@ use std::io::Write; -use byte_unit::Byte; +use byte_unit::{ + Byte, + UnitType, +}; use bevy_gaussian_splatting::{ GaussianCloud, @@ -33,6 +36,6 @@ fn main() { let data = cloud.encode(); gcloud_writer.write_all(data.as_slice()).expect("failed to write to gcloud file"); - let post_encode_bytes = Byte::from_bytes(std::fs::metadata(&gcloud_filename).expect("failed to get metadata").len() as u128); - println!("output file size: {}", post_encode_bytes.get_appropriate_unit(true).to_string()); + let post_encode_bytes = Byte::from_u64(std::fs::metadata(&gcloud_filename).expect("failed to get metadata").len()); + println!("output file size: {}", post_encode_bytes.get_appropriate_unit(UnitType::Decimal).to_string()); }