WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: dreary squashfs-lzma poorman emulation  (Read 2667 times)

Offline caminati

  • Full Member
  • ***
  • Posts: 184
    • Homepage
dreary squashfs-lzma poorman emulation
« on: January 29, 2011, 02:54:54 AM »
I miss slax modules' outstanding compression ratio given by squashfs-lzma, and for some large personal tczs I don't care about reading speed.

Not being smart enough to patch a kernel to support squashfs-lzma, I experimented a bit with fusecompress, and found that combining "mksquashfs -no{I,D,F,X}" with "fusecompress -o fc_c:lzma,fc_b:256" gives compression ratios just below that of slax's lzm.

So I remastered microcore.gz, just extending tce-load line:
Code: [Select]
     [ "$?" == 1 ] || sudo busybox mount "$THISAPP" /tmp/tcloop/"$APPNAME" -t squashfs -o loop,ro,bs=4096 2>&1
into
Code: [Select]
     [ "$?" == 1 ] || sudo busybox mount "$THISAPP" /tmp/tcloop/"$APPNAME" -t squashfs -o loop,ro,bs=4096 2>&1 || \
      { { sudo mkdir /mnt/fu; sudo fusecompress "${FROMWHERE}" /mnt/fu ; true ; } && sudo busybox mount "/mnt/fu/${APPNAME}.tcz" "/tmp/tcloop/${APPNAME}" ; }

which basically turns the directory containing a fusecompressed tcz into a fusecompress host directory mounted in /mnt/fu, then loop-mounts the virtually uncompressed squashfs tcz resulting in /mnt/fu, and proceeds as for a standard tcz.

Note that you have to specify "-o fc_c:lzma,fc_b:256" just upon creation of extension, not when reading it.

I am currently testing it, seems to work.

Now my questions/doubts:
« Last Edit: January 29, 2011, 04:16:48 AM by caminati »

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10957
Re: dreary squashfs-lzma poorman emulation
« Reply #1 on: January 29, 2011, 03:13:07 AM »
XZ compression for squashfs was merged for 2.6.38. XZ is the new LZMA format.
The only barriers that can stop you are the ones you create yourself.

Offline caminati

  • Full Member
  • ***
  • Posts: 184
    • Homepage
Re: dreary squashfs-lzma poorman emulation
« Reply #2 on: January 29, 2011, 04:23:56 AM »
Thanks for the good news!
Of course I would like to know when will tinycore adopt 2.6.38, which is still candidate btw, but I realize this is a hard question.

An easier one: do you know why xz won the race with its competitor lzip? It looks like no one adopted the latter, which does have some pros:

http://www.mail-archive.com/lzip-bug@nongnu.org/msg00065.html