Tiny Core Extensions > TCE Bugs

Unsquashfs then Resquashfs results in different sizes

(1/2) > >>

polikuo:
Hardware: Raspberry Pi 3 model B
OS: aarch64 beta release
I'm not sure if it happens on other platform so I post it here.

I'm compiling FLTK with XFT support, which should be bloat. (fltk-xft.tcz)
When I squash the extension, the tcz size is actually smaller than the standard one on the repo.  :o
Then I unsquash the repo tcz and resquash it, the new one is also smaller.

Here's what I've done:
Literally unsquashfs and mksquashfs immediately.

--- Code: ---SQUASH=$(mktemp -d)
cd $SQUASH
unsquashfs /mnt/mmcblk0p2/tce/optional/fltk-1.3.tcz
mksquashfs squashfs-root/ fltk-resquashed.tcz

--- End code ---

Compare the result:

--- Quote ---$ du /mnt/mmcblk0p2/tce/optional/fltk-1.3.tcz fltk-resquashed.tcz /tmp/tmp.H7oCSVptRt/fltk-xft.tcz
508K    /mnt/mmcblk0p2/tce/optional/fltk-1.3.tcz
468K    fltk-resquashed.tcz
492K    /tmp/tmp.H7oCSVptRt/fltk-xft.tcz

--- End quote ---

What kind of dark magic is happening here ?  ???

jazzbiker:
Hi, polikuo!
The first comes into mind, that original .tcz was squashed with the less compression level for faster access. You can check

--- Code: ---mksquashfs --help
--- End code ---
Have a nice Core!

Juanito:
Do you get the same as this:
--- Code: ---$ file /mnt/mmcblk0p2/tce/optional/fltk-1.3.tcz
/mnt/mmcblk0p2/tce/optional/fltk-1.3.tcz: Squashfs filesystem, little endian, version 4.0, zlib compressed, 516285 bytes, 10 inodes, blocksize: 4096 bytes
--- End code ---

.i.e. zlib compression, 4k block size?

polikuo:

--- Quote from: Juanito on October 05, 2020, 06:13:28 AM ---Do you get the same as this:
--- Code: ---$ file /mnt/mmcblk0p2/tce/optional/fltk-1.3.tcz
/mnt/mmcblk0p2/tce/optional/fltk-1.3.tcz: Squashfs filesystem, little endian, version 4.0, zlib compressed, 516285 bytes, 10 inodes, blocksize: 4096 bytes
--- End code ---

.i.e. zlib compression, 4k block size?

--- End quote ---

Nope  :(


--- Code: ---tc@box:/mnt/mmcblk0p2/compile/fltk-xft-aarch64$ file /mnt/mmcblk0p2/tce/optional/fltk-1.3.tcz
/mnt/mmcblk0p2/tce/optional/fltk-1.3.tcz: Squashfs filesystem, little endian, version 4.0, zlib compressed, 516285 bytes, 10 inodes, blocksize: 4096 bytes, created: Tue Aug 11 12:37:14 2020
tc@box:/mnt/mmcblk0p2/compile/fltk-xft-aarch64$ file /mnt/mmcblk0p2/tce/optional/fltk-xft.tcz
/mnt/mmcblk0p2/tce/optional/fltk-xft.tcz: Squashfs filesystem, little endian, version 4.0, zlib compressed, 502144 bytes, 13 inodes, blocksize: 131072 bytes, created: Mon Oct  5 08:29:13 2020

--- End code ---

IIRC, the core book says the squashfs-tools provides by TC is coded and compiled to use the right size by default.

BTW, I see there's a bajillion extensions packed with blocksize: 131072 bytes

Is it really THAT necessary ? No offense...

Juanito:
The default tinycore block size for squashfs is meant to be 4k - there’s a patch to set this as the default.

Navigation

[0] Message Index

[#] Next page

Go to full version