home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C!T ROM 2
/
ctrom_ii_b.zip
/
ctrom_ii_b
/
PROGRAM
/
BASIC
/
ZV25
/
ZV07.INC
< prev
next >
Wrap
Text File
|
1992-09-29
|
6KB
|
186 lines
'Compression file types from Dick Dennison
'Use with credit Ci$ID - 74270,3636
'zip file stuff
TYPE central 'central directory record
sig AS LONG 'zip signature &h02014b50
vers AS INTEGER 'version made by
extvers AS INTEGER 'version needed to extra
bitflag AS INTEGER 'general purpose bitflag
compmeth AS INTEGER 'compression method
modtime AS INTEGER 'packed time
moddate AS INTEGER 'packed date
CRC AS LONG 'crc 32 bit
compsize AS LONG 'compressed size
uncompsize AS LONG 'oldsize
namelen AS INTEGER 'file name length
extralen AS INTEGER 'extra field length
commentlen AS INTEGER'comment field length
disknum AS INTEGER 'disk number in this archive
infileattr AS INTEGER'int file attribute
extfileattr AS LONG 'ext file attribute
offsethead AS LONG 'offset of local header
' filename AS STRING * 12
END TYPE
'filename variable len(cent.filenamelen)
TYPE dirrec 'end of central directory record
sig AS LONG 'signature &h06054b50
disknum AS INTEGER
centdisknum AS INTEGER
direntthisdsk AS INTEGER
num AS INTEGER 'number of records on central dir
dirlen AS LONG 'size of central directory
offset AS LONG 'offset of central directory
commentlen AS INTEGER'length of zip comment
END TYPE
TYPE buftype
lin AS LONG 'buffer for signature comps
END TYPE
'lzh file stuff
TYPE head1
hsz AS STRING * 1 'header size
CKS AS STRING * 1 '16 bit checksum
END TYPE
TYPE Head2
mtd AS STRING * 5 'method
nsz AS LONG 'new size
osz AS LONG 'old size
tim AS INTEGER 'packed time
dat AS INTEGER 'packed date
ATR AS INTEGER 'file attribute
fnl AS STRING * 1 'file name length
END TYPE
TYPE head3
CRC AS INTEGER 'CRC
END TYPE
'arc file stuff
TYPE header
arcid AS INTEGER '1D
FileName AS STRING * 13 'filename
NewSize AS LONG 'size now
adate AS INTEGER 'packed date
atime AS INTEGER 'packed time
CRC AS INTEGER 'CRC
OldSize AS LONG 'uncompressed size
END TYPE
'zoo file stuff
TYPE zoomaster 'master header at beginning of file
zoohead AS STRING * 20
zoosig AS STRING * 8 'DCA7C4FD signature
zoo1ptr AS LONG
zooques AS LONG
zoomakver AS STRING * 1 'zoo version made by
zoominver AS STRING * 1 'minimum version needed to extract
END TYPE
TYPE zoofile 'file header
zoofsig AS STRING * 8 'DCA7C4FD signature
zooftyp AS STRING * 1
zoofcmp AS STRING * 1 'compression method
zoofnxh AS LONG 'location of next header
zoofcur AS LONG
zoofdat AS INTEGER 'packed date
zooftim AS INTEGER 'packed time
zoofcrc AS INTEGER 'crc
zoofosz AS LONG 'old size
zoofnsz AS LONG 'new size
zoofmver AS STRING * 1
zoofmin AS STRING * 1
zoofdel AS STRING * 1
zoofcmtp AS LONG 'comment pointer
zoofcmtl AS INTEGER 'comment length
extra AS STRING * 1
zoofnam AS STRING * 13 'filename
END TYPE
'pak file stuff
TYPE paktype
sig AS STRING * 1 '1 byte always 26
version AS STRING * 1 '1 byte) - type of compression used.
FileName AS STRING * 13 '(13 bytes) - an ASCIIZ string.
size AS LONG '(4 bytes) giving the current file size.
date AS INTEGER '(2 bytes) - packed date
time AS INTEGER '(2 bytes) - packed time
CRC AS INTEGER '(2 bytes) the CRC checksum for the expanded file.
length AS LONG '(4 bytes) - original length of file
END TYPE
'ARJ stuff
TYPE arjheader
id AS INTEGER
HeadSz AS INTEGER
fhdsz AS STRING * 1
vers AS STRING * 1
mintoext AS STRING * 1
hostos AS STRING * 1
arjflags AS STRING * 1
meth AS STRING * 1
ftype AS STRING * 1
res AS STRING * 1
time AS INTEGER
date AS INTEGER
sizenow AS LONG
origsize AS LONG
origcrc AS LONG
spec AS INTEGER
faccess AS INTEGER
hostdata AS INTEGER
END TYPE
'extradata as ?
'fname AS STRING * ? NULL terminated
'comment as string * ?
TYPE arjextra
CRC AS LONG
exthead AS INTEGER
extcrc AS LONG
END TYPE
'Squeeze stuff
TYPE Sqheader
sig AS STRING * 5
vers as string * 1
os AS STRING * 1
flag AS STRING * 1
END TYPE
TYPE Sqfheader
HeadSz AS STRING * 1
Alg AS STRING * 1
flag AS STRING * 1
NewSize AS LONG
OldSize AS LONG
Timef as integer
Datef AS integer
Attr AS STRING * 1
CRC AS LONG
END TYPE
'filename len = headsize - 20
'Includes for ZV 20+ 6/7/92
DECLARE FUNCTION factor$ (comp&, uncomp&)
DECLARE FUNCTION Long2str$ (numl&, length%)
DECLARE FUNCTION linstr% (list$, char$)
DECLARE FUNCTION Numfix$ (num%)
DECLARE FUNCTION PadNum$ (num$, Places%)
DECLARE FUNCTION guss$ (filestr$)
DECLARE FUNCTION getdir$ ()
DECLARE SUB cursor ()
DECLARE SUB Setdta ()
'=====================================
TYPE RegTypeX
ax AS INTEGER
bx AS INTEGER
cx AS INTEGER
dx AS INTEGER
bp AS INTEGER
si AS INTEGER
di AS INTEGER
flags AS INTEGER
ds AS INTEGER
es AS INTEGER
END TYPE
DECLARE SUB INTERRUPTX (intnum AS INTEGER, inreg AS RegTypeX, outreg AS RegTypeX)