hi,
ich bin gerade dabei, ein programm zu schreiben mit dem man zip-dateien erstellen kann. das komprimieren mit zlib klappt auch, allerdings gibt es ein problem, dass im tut von david leider nicht erklärt wird wie das ende einer zip-datei aussieht.
wotsit.org hat mir dazu einige infos gebracht, und zwar dass ans ende das hier kommen muss:
D. Central directory structure:
[file header 1]
.
.
.
[file header n]
[digital signature]
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
file name 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
file name (variable size)
extra field (variable size)
file comment (variable size)
Digital signature:
header signature 4 bytes (0x05054b50)
size of data 2 bytes
signature data (variable size)
----
G. End of central directory 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 directory on this disk 2 bytes
total number of entries in
the central directory 2 bytes
size of the central directory 4 bytes
offset of start of central
directory with respect to
the starting disk number 4 bytes
.ZIP file comment length 2 bytes
.ZIP file comment (variable size)
gibt es eine möglichkeit das wegzulassen?
welche funktion haben die abschließenden header? da steht doch nochmal fast genau das gleiche drin wie in dem lokalen Fileheader?!?
naja, thx für die antworten schonmal,
neonew