Display 'dcmp' IDs in command line listings of compressed resources

This commit is contained in:
dgelessus 2019-09-24 00:27:54 +02:00
parent c108af60ca
commit 84f09d0b83
1 changed files with 2 additions and 2 deletions

View File

@ -199,9 +199,9 @@ def _describe_resource(res: api.Resource, *, include_type: bool, decompress: boo
try:
res.compressed_info
except compress.DecompressError:
length_desc = f"decompression failed ({res.length_raw} bytes compressed)"
length_desc = f"unparseable compressed data header ({res.length_raw} bytes compressed)"
else:
length_desc = f"{res.length} bytes ({res.length_raw} bytes compressed)"
length_desc = f"{res.length} bytes ({res.length_raw} bytes compressed, 'dcmp' ({res.compressed_info.dcmp_id}) format)"
else:
length_desc = f"{res.length_raw} bytes"
content_desc_parts.append(length_desc)