home *** CD-ROM | disk | FTP | other *** search
- ;────────────────────────────────────── ──────────────────────────────────────
- ; ZIP File Structure Type
- ;─────────────────────────────────────────────────────────────────────────────
- LocalHdrType Struc ; Define TYPE for local header
- Signature Dd ? ; 00..03
- ExtractVersion Dw ? ; 04..05
- BitFlag Dw ? ; 06..07
- CompMethod Dw ? ; 08..09
- TimeStamp Dw ? ; 0A..0B
- DateStamp Dw ? ; 0C..0D
- crc32 Dd ? ; 0E..11
- CompSize Dd ? ; 12..15
- UnCompSize Dd ? ; 16..19
- FilenameLen Dw ? ; 1A..1B
- XFieldLen Dw ? ; 1C..1D
- LocalHdrType Ends
-
-
- ;────────────────────────────────────── ──────────────────────────────────────
- ; ZIP File Internal Signatures
- ;─────────────────────────────────────────────────────────────────────────────
- EVEN
- LocalSignature Dd 04034B50h ; Local file header signature
- DirSignature Dd 02014B50h ; Central directory signature
- EndSignature Dd 06054B50h ; Central dir end signature
-
-
- ;────────────────────────────────────── ──────────────────────────────────────
- ; Array of Compression Methods
- ;─────────────────────────────────────────────────────────────────────────────
- Method0 Db 'Stored '
- Method1 Db 'Shrunk '
- Method2 Db 'Reduce 1'
- Method3 Db 'Reduce 2'
- Method4 Db 'Reduce 3'
- Method5 Db 'Reduce 4'
- Method6 Db 'Implode '
- Method7 Db 'Unknown '
-
- EVEN
- MethodTbl Dw Offset Method0
- Dw Offset Method1
- Dw Offset Method2
- Dw Offset Method3
- Dw Offset Method4
- Dw Offset Method5
- Dw Offset Method6
- Dw Offset Method7
-
-
- ;────────────────────────────────────── ──────────────────────────────────────
- ; Error Messages
- ;─────────────────────────────────────────────────────────────────────────────
- NoParm$ Db 'PKV: Enter [Drv:\Path\] ZipName [.ZIP]',Cr,Lf,Lf,0
- Open_Err$ Db 'PKV: Error while opening ZIP file',Cr,Lf,Lf,0
- Read_Err$ Db 'PKV: Error while reading ZIP file',Cr,Lf,Lf,0
- Hdr_Err$ Db 'PKV: Error while reading header filename',Cr,Lf,Lf,0
- Seek_Err$ Db 'PKV: Error while setting file position pointer',Cr,Lf,Lf,0
- Bad_Zip$ Db 'PKV: Invalid local file header was found',Cr,Lf,Lf,0
-
-
- ;────────────────────────────────────── ──────────────────────────────────────
- ; Formatting Strings
- ;─────────────────────────────────────────────────────────────────────────────
- Newline Db Cr,Lf,0
- Search$ Db Cr,Lf,' Searching ZIP: ',0
- Header1$ Db ' Length Method Size Ratio Date Time CRC-32 Attr Name',Cr,Lf,0
- Header2$ Db ' ------ ------ ----- ----- ---- ---- ------ ---- ----',Cr,Lf,0
- Trailer1$ Db ' ------ ----- ----- -------',Cr,Lf,0
-
-
- ;────────────────────────────────────── ──────────────────────────────────────
- ; File Variables
- ;─────────────────────────────────────────────────────────────────────────────
- ZIP_Handle Dw 0 ; ZipFilehandle
- ZipFile Db 78 dup(0) ; Max length ZIP file name
-
-
- ;────────────────────────────────────── ──────────────────────────────────────
- ; MISC
- ;─────────────────────────────────────────────────────────────────────────────
- EVEN
- PSP Dw 0 ; Program Segment Prefix segment
- ZipFilePtr Dd 0 ; File position pointer
- TotalFiles Dw 0 ; Number of ZIP file members
- TotalLength Dd 0 ; Total uncompressed bytes
- TotalSize Dd 0 ; Total compressed bytes
-
- ZIP LocalHdrType ? ; Local file header record
- LocalFileName Db 128 dup(?) ; Filename, Xtra Field text
-
- @TBuffer Db 10 dup(?) ; AXDX2Dec needs 10 bytes
-
- ;Display field structure
- @Length Db 7 dup(?) ; Uncompressed length
- Db 2 dup(?) ; Padding
- @Method Db 7 dup(?) ; Compression method
- @Size Db 7 dup(?) ; Compressed length
- Db 2 dup(?) ; Padding
- @Ratio Db 2 dup(?) ; Ratio
- Db ? ; % sign
- Db 2 dup(?) ; Padding
- @Date Db 8 dup(?) ; Date
- Db 2 dup(?) ; Padding
- @Time Db 5 dup(?) ; Time
- Db 2 dup(?) ; Padding
- @CRC Db 8 dup(?) ; CRC-32
- Db ? ; Padding
- @Attr Db 3 dup(?) ; File attributes
- Db 2 dup(?) ; Padding
- @Name Db 18 dup(?) ; File name
- @Junk Db 5 dup(?) ; Safety factor
- ;End structure
-