From 144b554f0db05ca9903bd9cb3331fc69c0ab098a Mon Sep 17 00:00:00 2001 From: phiresky Date: Tue, 9 Jun 2020 13:27:34 +0200 Subject: [PATCH] zip print bytes pretty --- src/adapters/zip.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/adapters/zip.rs b/src/adapters/zip.rs index 1e07780..c77c782 100644 --- a/src/adapters/zip.rs +++ b/src/adapters/zip.rs @@ -1,5 +1,5 @@ use super::*; -use crate::preproc::rga_preproc; +use crate::{preproc::rga_preproc, print_bytes}; use ::zip::read::ZipFile; use anyhow::*; use lazy_static::lazy_static; @@ -65,12 +65,12 @@ impl FileAdapter for ZipAdapter { continue; } debug!( - "{}{}|{}: {} bytes ({} bytes packed)", + "{}{}|{}: {} ({} packed)", line_prefix, filepath_hint.to_string_lossy(), file.name(), - file.size(), - file.compressed_size() + print_bytes(file.size() as f64), + print_bytes(file.compressed_size() as f64) ); let line_prefix = &format!("{}{}: ", line_prefix, file.name()); rga_preproc(AdaptInfo {