Skip to content

Commit a28a442

Browse files
committed
show size in MiB pre-compression
Signed-off-by: Zen <[email protected]>
1 parent 6ee3f98 commit a28a442

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/pycpio/writer/writer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ def __bytes__(self):
3131

3232
def compress(self, data):
3333
""" Attempts to compress the data using the specified compression type. """
34-
if self.compression == 'xz':
34+
if self.compression == 'xz' or self.comression.lower() == 'true':
3535
import lzma
36-
self.logger.info("Compressing data with xz, original size: %d" % len(data))
36+
self.logger.info("XZ compressing the CPIO data, original size: %.2f MiB" % (len(data) / (2 ** 20)))
3737
data = lzma.compress(data, check=self.xz_crc)
3838
elif self.compression not in [False, 'False', None, '', 'false']:
3939
raise NotImplementedError("Compression type not supported: %s" % self.compression)

0 commit comments

Comments
 (0)