All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] support for xz compression format
@ 2010-01-26 22:55 Szymon Janc
  2010-01-26 23:25 ` Vladimir 'φ-coder/phcoder' Serbinenko
  0 siblings, 1 reply; 2+ messages in thread
From: Szymon Janc @ 2010-01-26 22:55 UTC (permalink / raw)
  To: grub-devel

[-- Attachment #1: Type: text/plain, Size: 997 bytes --]

Hello,

Attached patch adds support for xz compressed files. Interface is similar to 
gzio: grub_xzio_open() and grub_xzfile_open(). Files: xzio.h and xzio.c

Decompression algorithm is imported (no source code changes) from 
http://tukaani.org/xz/embedded.html and is located in lib/xzembed directory
(files xz_* except xz_wrap.h which is a glue header)

XZ embedded supports only crc32 integration check so if You want to test it
use  `xz --check=crc32` to compress,  It also supports BCJ filters (not enabled 
with this patch) so it is possible to get extra few % compression ratio with 
executables.

known issues:
- decoder dictionary size is hardcoded, discovery at runtime would be better
  (it's on my TODO list)
- grub_file_seek() will break reading (not a big deal, xz streams are not
 seekable afterall, if needed should be possible to implement but will cause 
read performance penatly)


Suggestions and comments are welcome :-)


-- 
Szymon K. Janc
szymon@janc.net.pl // GG: 1383435

[-- Attachment #2: xzio.diff.bz2 --]
[-- Type: application/x-bzip, Size: 21864 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-01-26 23:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-26 22:55 [PATCH] support for xz compression format Szymon Janc
2010-01-26 23:25 ` Vladimir 'φ-coder/phcoder' Serbinenko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.