ARHANGEL v1.40 Copyright (c) 1997-2000 George Lyapko

About ARHANGEL
--------------

     ARHANGEL is a file archiving utility (based on, but not
compatible with, LGHA and HA). It gives good compression ratio at 
acceptable speed. It shows one the world's best results in 24-bit
images compression (especially on TIFF images). Currently ARHANGEL
recognizes Windows and OS/2 BMP, Targa, Sun Raster, TIFF images
(uncompressed, contiguous strips), but you could compress any(?) 24-bit
RGB images using -mh... switch.
     Since version 1.33 ARHANGEL supports LFN(long file names) under
Win9X.

Usage
-----

     Command line for ARHANGEL looks like this:

     arhangel <Command> [-|/Option] <archive> [-|/Option] [File_mask] [Path\] [@list]

     Commands:

	a	Add files matching file_mask to archive.

	e	Extract files matching file_mask from archive.

	x	Extract files matching file_mask from archive
		with path information.

	l	List files matching file_mask in archive.

	v	Verbose listing (file names in separate line)

	d	Delete files matching file_mask from archive. 
		If archive is empty after deletion it is removed.

	f	Freshen files in archive. All files matching file_mask and
		newer than version already in archive are updated to archive.

	u	Update files to archive. All files matching file_mask that
		are newer than version already in archive or are not present
		in archive are updated to archive.

	t	Test files in archive.

	s	Convert archive to self-extracting file
		(SFX overhead is currently 12812 byte in size)

Available options:

	r	Recurse through subdirectories

	f	Full listing

	m	Move files to archive

	e	Don't use stored path information

	t	Touch files during extraction (sets file DateTime
		to system DateTime)

	a	Allow any file attribute

	o	Overwrite existing file during extraction

	p	Pause after screenful

	q	Quiet work

	d	Store directories information (even empty ones)

	-	No further options

	mt[f]	Experimental option.
		English texts predictor.
		'mtf' means to force this predictor
		
	mz[n][f]
		RLE-predictor. Used by default (-mz1) on Microsoft Office
		(XLS,DOC,MDB),Windows help files, DBASE III files but may
		be good also for other databases and some other files.
		Text files compression is worse in most cases.
		
		-mz0 means not use RLE-predictor (overrides default settings)
		-mz[n] means use RLE-predictor order n+2(by default n=1)
		for example, -z3 means to use RLE only if repeated 
		string contains 5 or more characters.
		-mzf,
		-mz2f means force RLE-predictor usage

	x<mask> Exclude files matching <mask>

	x@<list>
		Read masks to exclude from list file

	w<path> Path for temporary files, by default - current directory

	path    Extraction path (MUST ends with \)

	list    File with mask list to process

	0,1,2	Use compression method:
		0 -CPY- Simple copying of file
		1 -ASC- LZ77 followed by arithmetic coder
		2 -HSC- Finite context modelling (order 1-6) followed by
			arithmetic coder
		Default means try both methods on small part of file.
		If you want to get best available compression try to
		specify both methods in command line:
		ARHANGEL a -1 -2 ...
		In listing, you may also see:
		B -BMC- Uncompressed 24-bit BMP compression
		I -IMC- any other 24-bit images compression
		T -ETC- English text compression

	mm[N]	Try different predictors (for multimedia, executables etc.)
		If N=1-5 then force predictor number N
		1-4 - 	simple delta-N predictor
		5 -	Intel processor-based executables predictor
		8 -	16-bit stereo WAV predictor

	mp<N>	Set mask for predictors used for image compression
		(from 1 to 63). 
		For example:
		 -mp55 means to use predictors 5,4,2,1,0 (55d=110111b)
		 -mp9 means to use predictors 3 and 0 (9d=001001b)
		(Used with -mm for 24-bit image compression)

	mb<N>	Set base("median") color for image compression from
		1 to 3.	By default ARHANGEL tries to determine the
		best color (but sometimes detection fails).
		(Used with -mm for 24-bit image compression)

	ms<N>	Set block size in pixels. By default, ARHANGEL uses
		10 pixels blocks for "natural" images and whole line
		for others.
		(Used with -mm for 24-bit image compression)
	
	mr<N>	Apply different ZRLE from 0 to 3(by default -mr3 is used).
		-mr0 means don't use ZRLE
		-mr1 pack all 0's
		-mr2 pack 0000 sequences
		-mr3 pack 000 sequences
		(Used with -mm for 24-bit image compression)
		
	mh<N1>r<N2>c<N3>
		Raw 24-bit uncompressed images compression.
		(Used with -mm for 24-bit image compression)
		N1 stands for header size in bytes.
		N2 is image height in pixels.
		N3 is image width in pixels.
		For example, to compress an 640x480 Targa image,
		you should use(of course, arhangel recognizes Targa images
		without -mh...):
		
		arhangel a -mm -mh24r480c640 archive image.tga

	mf	Force images BMC/IMC compression
		(Used with -mm for 24-bit image compression)
	
	c<N>	Set search depth for ASC method (1-31900).
		Bigger depth slows down compression, but gives
		slightly better ratio.

	l<N>	Set minimal distance limit for ASC method(1-31900).
		Means maximal offset in dictionary, when 3 bytes are
		sent as length+offset pair. For binary files it's
		better to set l=31900.

	mo<N>	Set order for HSC method (0-6). By default ARHANGEL uses
		order 4 (for sound and image compression - order 2 or 3).

	mc<N>	Set context count for HSC method (1-16000 for orders 1-4,
		1-10000 for orders 5,6). By default ARHANGEL uses 10000
		contexts (for sound compression - 2500)

Wildcards usage slightly differs from DOS, *t*.*n means any file with
symbol 't' in name and extension ending with 'n'.
By default, archives get .LG extension.

Limitations
-----------
ARHANGEL will not compress images larger than 10900x65535 as images.

About compression improvement on images
---------------------------------------
1.How ARHANGEL recognizes image type?
  If it seems to be 'natural' image ARHANGEL uses -mp61(63,55,39,37),
  -ms8(9,7,11), and order 2.
  If it seems to be 'artificial' image ARHANGEL don't use
  predictors, -mo5 -mc6911.
  Otherwise ARHANGEL uses -mp61(37,3,1), -ms12(6,14,16,whole line)
  and order 4 (or 3).
  Sometimes this identification fails, so you may use different
  settings for different images.
2.If you want to achieve best available compression, you should try
  following options:
 a)try to use no ZRLE (-mr0).
 b)try to change base color (-mbN).
 c)try to change order (-mo2,-mo3,-mo4).
 d)try to apply different predictors (most common - 61,63,39,47,37).
 e)try to change block size with -ms switch (most common - 7-12,25-30,
   for whole line use -ms10000).
 f)try to change number of context (most common - 144-240,704-880 for
   order 2, about 3000 for order 3, about 9000 for order 4)

Thanks
------

I'd like to thanks to:

Harri Hirvola	 - for his excellent program HA and understandable
		   sources

Szymon Grabowski - for text, executables and multimedia compression
		   ideas (not all of them are included in this version)
		   
Uwe Herklotz	 - for some ideas and hours of testing

RAO Inc.         - for its Art of lossless image compression
		   
Jeff Gilchrist	 - for A.C.T.

George Shadoff,
Jaime Tejedor Gomez,
Slava,
Kizman Ferencz	   - for testing or/and bugs reporting


all registered users of LGHA, whose contribution helps me to spend
more time on ARHANGEL improvement.

You may contact author by:

Internet: http://www.geocities.com/SiliconValley/Lab/6606

e-mail:	  lyapko@yahoo.com

mail:     Lyapko Yuri Georgievich
          ul.G.Petrova,30/66
          Mukachevo
          89607 Ukraine
