smaller file gets bigger when compressed
i have a large python file with some rather wide divider bars as comments. they are all 160 characters wide and no source lines come anywhere close to that wide. so i checked the width of the file with those comments removed. 125. so i trimmed the width of the file to 128 characters. for fun i decided to cut the width in steps of 8 and compress each (160, 152, 144, 136, 128). i used "xz -9" to do the compression, the original sizes are: 50462, 49847, 49231, 48615, 47999. the compressed sizes are: 9876, 9880, 9876, 9876, 9860. the 2nd file is smaller but its compressed file is larger. then the 3rd and 4th compressed files are the same size as the 1st. is this odd?
that python file can be seen here in the original width.
Last edited by Skaperen; September 19th, 2019 at 08:09 AM.
Reason: add link to file
Mask wearer, Social distancer, System Administrator, Programmer, Linux advocate, Command Line user, Ham radio operator (KA9WGN/8, tech), Photographer (hobby), occasional tweetXer
Bookmarks