lzo_wrapper: Rename -Xlzo_algo option to -Xalgorithm

The compression specific options are directed to the
appropriate compressor using the -comp option, so the
lzo part of lzo_algorithm is unnecessary and redundant.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
Update dates

Have not updated the version dates for a long time.  There's
been a couple of improvements since then.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
lzo_wrapper: Rename compression_option to compression-option

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
lzo_wrapper: Use SQUASHFS_LZO1X_999_COMP_DEFAULT rather than hard-coded const

In lzo_usage() where the default compression level for
LZO1X_999 compressed streams is printed, use
SQUASHFS_LZO1X_999_COMP_DEFAULT rather than the hard-coded constant.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
unsquashfs/read_fs: Always_use_fragments should be Always-use-fragments

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
gzip_wrapper: significantly improved implementation

Siginficantly improve the gzip compressor implementation
by adding support for two new compression options:

	-Xcompression-level <compression-level>
		<compression-level> should be 1 .. 9 (default 9)

	-Xwindow-size <window-size>
		<window-size> should be 8 .. 15 (default 15)

These two options allow the level of compression and window
size to be changed.  Changing these can improve compression
speed and/or compression time memory requirements.

The defaults match the original unchangable compression parameters
used previously.  These defaults represent maximum gzip compression
(at the expense of compresion speed and memory overhead), and so
alterring them will reduce compression achieved.

However, there are times where reduced compressed is desireable:

	- times where the build time for experimental images is
	  paramount
	- times where the build and/or target system is relatively weak,
	  and so will benefit from less aggressive compression
	  parameters.

It may well be the case that lower compression levels for gzip may
give better results than higher compression levels for algorithms which
are believed to be less demanding.

As usual, experimentation is the key to discovering which compression
algorithm and compression options are the best for your application.

Note: gzip compressed filesystems with the new options are
compatible with all earlier Squashfs implementations (kernel and unsquashfs),
back to the first release of Squashfs 4.0 in early 2009.

The only exception is appending: earlier versions of Mksquashfs will
*correctly* refuse to append to a gzipped filesystem created with the
above new compression options because it is unable to set the compression
options (i.e. it will use the unchangable default compression
parameters).

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
mksquashfs: redo -comp <compressor> parsing

Previously, -X compression options were only supported by
xz, a non-default compressor.

This led to a perfectly acceptable parsing and error
message reporting strategy where -comp xz was needed to
be specified first on the command line - the -X options were
not understood by the default gzip compressor, and so Mksquashfs
needed -comp xz specified first to switch to the appropriate
compressor.

i.e.

phillip@ravolox:/tmp$ mksquashfs xxx xxx.sqsh -Xdict-size 8192 -comp xz
mksquashfs: Unrecognised compressor option -Xdict-size
mksquashfs: Did you forget to specify -comp, or specify it after the compressor specific option?

An acceptable error message saying -comp xz should be specified
first.  Despite the fact it implies a limitation in the parser such
that the appropriate compressor cannot be identified before parsing
the -X options.

But it led to some silly error messages too

phillip@ravolox:/tmp$ mksquashfs xxx xxx.sqsh -comp xz -Xdict-sze 8192
mksquashfs: Unrecognised compressor option -Xdict-sze
mksquashfs: Did you forget to specify -comp, or specify it after the compressor specific option?

The cause of the failure is the mistyping of the xz specific
compressor option, but it still assumes the cause of the failure
is the lack of an appropriate -comp xz first.

Again, repeated -comp xz's generate a misleading error message

phillip@ravolox:/tmp$ mksquashfs xxx xxx.sqsh -comp xz -Xdict-size 8192 -comp xz
mksquashfs: -comp must appear before -X options

The introduction of compression options for the default gzip compressor
exacerbates such misleading error messages.

phillip@ravolox:/tmp$ mksquashfs xxx xxx.sqsh -Xcompresson-level 6
mksquashfs: Unrecognised compressor option -Xcompresson-level
mksquashfs: Did you forget to specify -comp, or specify it after the compressor specific option?

The mistyping of the default compressor -Xcompression-level option
causes the error message did you specify -comp gzip after the
compressor specific option, when no such option is necessary, because
it's the default compressor.

Again, giving the -comp gzip option after the -X option ...

phillip@ravolox:/tmp$ mksquashfs xxx xxx.sqsh -Xcompression-level 6 -comp gzip
mksquashfs: -comp must appear before -X options

gives the misleading error message that -comp gzip should be specified
before -Xcompression-level, which is completely wrong, as
-Xcompression-level can be given before any -comp because it is
a compression option for the default compressor.

In short, the stateful -comp where it must appear before any
-X compression options previously caused some odd error messages,
but it is anticipated it will cause even more odd behaviour now
that compression options are understood by the default compressor.

So, remove the need to have -comp specified before any -X option, and allow
it to be specified anywhere.  Thereby removing the dependency and
the misleading error messages in one go.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
mksquashfs: display compressor options when -X option is not recognised

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>