
		IFND	LIBRARIES_DECRUNCH_I

LIBRARIES_DECRUNCH_I	SET	1

**
**	$Filename: libraries/decrunch.i $
**	$Release: 2.0a $
**
**	Copyright © 1992 Georg Hörmann
**	All Rights Reserved
**

DECRUNCHVERSION		=	34
DECRUNCHREVISION	=	96

DECRUNCHNAME	MACRO
		dc.b	'decrunch.library',0
		ENDM

** Let's start with the library base. There's not too much in it...

		rsset	34	;standard lib base
dc_seglist	rs.l	1	;segment list of library (private)
dc_entries	rs.w	1	;number of recognized crunchers
dc_sizeof	=	__RS

** Ok, now let's come to the CrunchInfo structure. There are definitely
** more definitions here...

		rsreset
ci_data		rs.l	1	;pointer to crunched file
ci_name		rs.l	1	;pointer to name (null terminated)
ci_decdata	rs.l	1	;pointer to decrunched file (READ ONLY)
ci_declen	rs.l	1	;length of decrunched file (READ ONLY)
ci_reallen	rs.l	1	;allocated buffer length (READ ONLY)
ci_packnum	rs.b	1	;packer number (READ ONLY)
ci_packtype	rs.b	1	;packer type (READ ONLY)
ci_datalen	rs.l	1	;length of crunched file (for PP data files)
ci_error	rs.w	1	;error code if decrunch failed
ci_extrainfo	rs.l	1	;special info (private)
ci_sizeof	=	__RS

** Packer numbers as defined in this release. These values will stay
** the same in future updates. You might use them to define others than
** the default packer names. See default names after the numbers.

pn_pp2x		=	1	; "PowerPacker 2.x"
pn_pp30		=	2	; "PowerPacker 3.0"
pn_imp31	=	3	; "Imploder 1.0-3.1"
pn_imp40	=	4	; "Imploder 4.0"
pn_tit11	=	5	; "Titanics Cruncher 1.1"
pn_tit12	=	6	; "Titanics Cruncher 1.2"
pn_tnm11	=	7	; "TNM Cruncher 1.1"
pn_pp40		=	8	; "PowerPacker 4.0"
pn_pp40lh	=	9	; "PP 4.0 Library"
pn_drag10	=	10	; "DragPack 1.0"
pn_drag25	=	11	; "DragPack 2.52"
pn_master30r	=	12	; "Master Cruncher 3.0 R"
pn_packit10	=	13	; "PackIt 1.0"
pn_turbosq80	=	14	; "TurboSqueezer 8.0"
pn_libimp	=	15	; "Lib Imploded"
pn_crmrn	=	16	; "CrunchMania 1.4 R/N"
pn_crmrs	=	17	; "CrunchMania 1.4 R/S"
pn_pp30ov	=	18	; "PP 3.0 Overlayed"
pn_pp30pw	=	19	; "PP 3.0 Password"
pn_pp40ov	=	20	; "PP 4.0 Overlayed"
pn_pp40ovlh	=	21	; "PP 4.0 Overlay/Lib"
pn_pp40pw	=	22	; "PP 4.0 Password"
pn_pp40pwlh	=	23	; "PP 4.0 Password/Lib"
pn_bd20		=	24	; "Black&Decker 2.0"
pn_bk20		=	25	; "ByteKiller 2.0"
pn_bk30		=	26	; "ByteKiller 3.0"
pn_flash10	=	27	; "FlashSpeed 1.0"
pn_hpc		=	28	; "High Pressure Cruncher"
pn_rsi		=	29	; "RSI Packer 1.4"
pn_master30a	=	30	; "Master Cruncher 3.0 A"
pn_time22	=	31	; "Time Cruncher 1.7-2.2"
pn_tfa		=	32	; "TFA Cruncher 1.54"
pn_turtle13	=	33	; "Turtle Smasher 1.3"
pn_tetra21	=	34	; "TetraPack 2.1"
pn_tetra21pro	=	35	; "TetraPack 2.1 Pro"
pn_tetra22	=	36	; "TetraPack 2.2"
pn_tetra22pro	=	37	; "TetraPack 2.2 Pro"
pn_defjam32	=	38	; "DefJam Cruncher 3.2"
pn_defjam32pro	=	39	; "DefJam Cruncher 3.2 Pro"
pn_syncro46k	=	40	; "Syncro Packer 4.6 K"
pn_crmas10	=	41	; "Crunch Master 1.0"
pn_hqc20	=	42	; "HQC Cruncher 2.0"
pn_maxp12	=	43	; "MaxPacker 1.2"
pn_mega12r	=	44	; "Mega Cruncher 1.2 R"
pn_relo10	=	45	; "ReloKit 1.0"
pn_stc27n	=	46	; "StoneCracker 2.70"
pn_stc27k	=	47	; "StoneCracker 2.70 K"
pn_stc299	=	48	; "StoneCracker 2.99"
pn_stc30	=	49	; "StoneCracker 3.00"
pn_stc31	=	50	; "StoneCracker 3.10"
pn_mega10	=	51	; "Mega Cruncher 1.0"
pn_syncro46	=	52	; "Syncro Packer 4.6"
pn_tryit101	=	53	; "TryIt 1.01"
pn_mega12a	=	54	; "Mega Cruncher 1.2 A"
pn_ultp11	=	55	; "Ultimate Packer 1.1b"
pn_imp31p	=	56	; "Imploder 1.0-3.1 P"
pn_stc311	=	57	; "StoneCracker 3.11"
pn_double10	=	58	; "Double Action 1.0"
pn_stc299d	=	59	; "StoneCracker 2.99d"
pn_bkpro10	=	60	; "ByteKiller Pro 1.0"
pn_bkpro10k	=	61	; "ByteKiller Pro 1.0 K"
pn_spike15	=	62	; "Spike Cruncher 1.5"
pn_com10e	=	63	; "Crunch-O-Matic 1.0 E"
pn_com10t	=	64	; "Crunch-O-Matic 1.0 I/M/T"
pn_crm14a	=	65	; "CrunchMania 1.4 A/L"
pn_stc401a	=	66	; "StoneCracker 4.01 A"
pn_stc401ba	=	67	; "StoneCracker 4.01ß A"
pn_stc400	=	68	; "StoneCracker 4.00"
pn_stc401c	=	69	; "StoneCracker 4.01 C"
pn_tetra102	=	70	; "TetraPack 1.02"
pn_stc292	=	71	; "StoneCracker 2.92"
pn_pp20d	=	72	; "PowerPacker D"
pn_px20d	=	73	; "PowerPacker D/E"
pn_s300d	=	74	; "StoneCracker 3.00 D"
pn_s310d	=	75	; "StoneCracker 3.10 D"
pn_s400d	=	76	; "StoneCracker 4.00 D"
pn_s401d	=	77	; "StoneCracker 4.01 D"
pn_crm14d	=	78	; "CrunchMania 1.4 D"
pn_fcg10	=	79	; "FCG 1.0"
pn_packit10d	=	80	; "PackIt 1.0 D"
pn_dp252d	=	81	; "DragPack 2.52 D"
pn_freeway	=	82	; "Freeway 0.7"
pn_greatest	=	82	; (private)

** Packer type indicates the type of decrunch header attached to the
** crunched file.

pt_reloc	=	0	;relocatible decruncher
pt_abs		=	1	;absolute address decruncher
pt_data		=	2	;data header

** Error codes you receive in the ci_error field if decrunching failed.
** Additionally to the error code you'll get a pointer to a default
** error string (null terminated) in ci_decdata.

de_undefined	=	0	;doesn't occur in this release
de_hunks	=	1	;illegal hunk structure (damaged file?)
de_memory	=	2	;not enough memory for decrunching
de_password	=	3	;wrong password
de_format	=	4	;decrunch header format is wrong
de_checksum	=	5	;decruncher data checksum is wrong

** Library vector offsets for this release. See them as constants for
** further updates.

_LVOAllocCrunchInfo	=	-30
_LVOFreeCrunchInfo	=	-36
_LVOGetCruncher		=	-42
_LVODecrunch		=	-48
_LVOTestHunkStructure	=	-54

		ENDC	;LIBRARIES_DECRUNCH_I

