zip文件格式?
有谁知道? 问题点数:20、回复次数:5Top
1 楼hester(贺子)回复于 2002-03-26 22:15:42 得分 0
就是winzip压缩成的文件,winzip网上到处都有,是免费软件,可以用来解压缩Top
2 楼Ah(蓝过天)回复于 2002-03-27 10:16:39 得分 0
这个我知道,我是说我想知道zip文件的数据结构Top
3 楼hzy_csdn(边城浪子)回复于 2002-04-04 19:45:54 得分 5
a. local file header:
local file header signature 4 bytes (0x04034b50)
version needed to extract 2 bytes
general purpose bit flag 2 bytes
compression method 2 bytes
last mod file time 2 bytes
last mod file date 2 bytes
crc-32 4 bytes
compressed size 4 bytes
uncompressed size 4 bytes
filename length 2 bytes
extra field length 2 bytes
filename (variable size)
extra field (variable size)
b. data descriptor:
crc-32 4 bytes
compressed size 4 bytes
uncompressed size 4 bytes
this descriptor exists only if bit 3 of the general
purpose bit flag is set (see below). it is byte aligned
and immediately follows the last byte of compressed data.
this descriptor is used only when it was not possible to
seek in the output zip file, e.g., when the output zip file
was standard output or a non seekable device.
c. central directory structure:
[file header] . . . end of central dir record
file header:
central file header signature 4 bytes (0x02014b50)
version made by 2 bytes
version needed to extract 2 bytes
general purpose bit flag 2 bytes
compression method 2 bytes
last mod file time 2 bytes
last mod file date 2 bytes
crc-32 4 bytes
compressed size 4 bytes
uncompressed size 4 bytes
filename length 2 bytes
extra field length 2 bytes
file comment length 2 bytes
disk number start 2 bytes
internal file attributes 2 bytes
external file attributes 4 bytes
relative offset of local header 4 bytes
filename (variable size)
extra field (variable size)
file comment (variable size)
end of central dir record:
end of central dir signature 4 bytes (0x06054b50)
number of this disk 2 bytes
number of the disk with the
start of the central directory 2 bytes
total number of entries in
the central dir on this disk 2 bytes
total number of entries in
the central dir 2 bytes
size of the central directory 4 bytes
offset of start of central
directory with respect to
the starting disk number 4 bytes
zipfile comment length 2 bytes
zipfile comment (variable size)
Top
4 楼huqiming(Super)回复于 2002-04-05 18:59:19 得分 15
zip的压缩源代码如下:
http://www.vchelp.net/source/source_file.htmTop
5 楼cplusc(5i海洋)回复于 2002-04-05 20:22:24 得分 0
收藏Top




