X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flibpspp%2Fzip-reader.h;h=05642ffdc0ca2c442eef14a070d3b3a878d3f9e0;hb=6e03317ca14de31a0a20c567cecfb005dabf294d;hp=6277b768e041939659d9b9185c23eb46be7f754e;hpb=b754fbf65fcd1b4fb466bbba6af71e6717df01e3;p=pspp diff --git a/src/libpspp/zip-reader.h b/src/libpspp/zip-reader.h index 6277b768e0..05642ffdc0 100644 --- a/src/libpspp/zip-reader.h +++ b/src/libpspp/zip-reader.h @@ -18,44 +18,10 @@ #ifndef ZIP_READER_H #define ZIP_READER_H 1 -#include - +struct zip_member; struct zip_reader; struct string; -enum compression - { - COMPRESSION_STORED = 0, - COMPRESSION_INFLATE, - n_COMPRESSION - }; - -struct zip_member -{ - FILE *fp; /* The stream from which the data is read */ - uint32_t offset; /* Starting offset in file. */ - uint32_t comp_size; /* Length of member file data, in bytes. */ - uint32_t ucomp_size; /* Uncompressed length of member file data, in bytes. */ - uint32_t expected_crc; /* CRC-32 of member file data.. */ - char *name; /* Name of member file. */ - uint32_t crc; - enum compression compression; - - size_t bytes_unread; /* Number of bytes left in the member available for reading */ - int ref_cnt; - struct string *errmsgs; /* A string to hold error messages. - This string is NOT owned by this object. */ - void *aux; -}; - -struct decompressor -{ - bool (*init) (struct zip_member *); - int (*read) (struct zip_member *, void *, size_t); - void (*finish) (struct zip_member *); -}; - - void zm_dump (const struct zip_member *zm); /* Create zip reader to read the file called FILENAME.