* src/native/vm/cldc1.1/com_sun_cldc_io_ResourceInputStream.c
[cacao.git] / src / vmcore / zip.h
index 97e9e00d67c339349217a5bcd642be6eb98fadb3..8cd50c8816cd3053ee4f4a7cf39af7ef07519bf4 100644 (file)
@@ -22,7 +22,7 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: zip.h 7246 2007-01-29 18:49:05Z twisti $
+   $Id: zip.h 8347 2007-08-18 13:04:59Z twisti $
 
 */
 
 #include "vmcore/utf8.h"
 
 
+/* 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
+   file name length                2 bytes
+   extra field length              2 bytes
+
+   file name (variable size)
+   extra field (variable size)
+
+*******************************************************************************/
+
+#define LFH_HEADER_SIZE              30
+
+#define LFH_SIGNATURE                0x04034b50
+#define LFH_FILE_NAME_LENGTH         26
+#define LFH_EXTRA_FIELD_LENGTH       28
+
+typedef struct lfh lfh;
+
+struct lfh {
+       u2 compressionmethod;
+       u4 compressedsize;
+       u4 uncompressedsize;
+       u2 filenamelength;
+       u2 extrafieldlength;
+};
+
 /* hashtable_zipfile_entry ****************************************************/
 
 typedef struct hashtable_zipfile_entry hashtable_zipfile_entry;