blob: 9c9b574546ee1dd28d7ea07344899619dcd964f7 [file] [log] [blame]
API Plans
=========
Compression
-----------
int zip_set_file_compression(struct zip *archive, zip_uint64_t idx,
zip_uint16_t method, zip_uint32_t flags);
flags: 0-15: compression ratio (0: fast, 15: best)
16: default
higher bits: method specific
Encryption
----------
struct zip *zip_open_encrypted(const char *path, int flags,
const char *password, int *errorp);
int zip_set_encryption(struct zip *archive, zip_uint64_t idx,
zip_uint16_t method, const char *password);
void zip_set_archive_encryption(struct zip *archive,
zip_uint16_t method, const char *password);
Extra Fields
------------
zip_uint32_t zip_get_extra_field_num(struct zip *archive, zip_uint64_t idx);
int zip_get_extra_field_index(struct zip *archive, zip_uint64_t idx,
zip_uint32_t ef_idx, zip_uint16_t *ID,
zip_uint16_t *len, void **content);
int zip_get_extra_field_id(struct zip *archive, zip_uint64_t idx,
zip_uint16_t ID, zip_uint16_t *len, void **content);
int zip_set_extra_field_id(struct zip *archive, zip_uint64_t idx,
zip_uint16_t ID, zip_uint16_t len, void *content);
API Issues
==========
* character encoding in file names and comments (see mail)
* compression/crypt implementations: how to set error code on failure
* compression/crypt error messages a la ZIP_ER_ZLIB (no detailed info passing)
Features
========
* I/O methods
* do not compress if storing is smaller
* support streaming output (creating new archive to e.g. stdout)
* add functions to:
. set last modification time for entry
. read/set ASCII file flag? (wiz: more general options?)
. get/set "version made by" and "external file attributes"
(can be used to decide if an entry is a directory, if the
archive was created on DOS)
* zip_commit (to finish changes without closing archive)
* support for zip64 (large file)
* add custom compression function support
* close even if error?
* support for old compression methods?????
* zip_replace_zip: allow rewinding
* zip_replace_zip: remember compression method, recompress if different speced
* zipcmp: add option for file content comparison
* append to files (for self-extracting files)
Bugs
====
* some systems return NULL for malloc(0); fix libzip to not use malloc(0)
* check for limits imposed by format (central dir size, file size, ...)
* set "version of encoding software" to proper value (2.0?)
* _zip_checkcons return value can overflow
* _zip_u2d_time: handle localtime(3) failure
* missing -Wl,-R in pkg-config file
* zip_open: consistency check: check data descriptor
* POSIX: zip_open: check whether file can be created and fail if not
* POSIX: fix permissions of new file to match old one
Cleanup
=======
* get rid of zip_get_{compression,encryption}_implementation
* use zip_*int*_t internally
* don't make zip_source_zip go through zip_fread
* completely get rid of off_t
Consistency
===========
* check arguments for every entry point into libzip
* check that local headers come before central dir
Test Case Issues
================
* test calls against old API
* run regression tests also from CMake framework
* rename deleted (fails)
* rename file to dir/ and vice versa (fails)
* fix comment test to be newline insensitive
* (add, replace)
add to empty zip
add to existing zip
add w/ existing file name [E]
replace ok
replace w/ illegal index [E]
replace w/ deleted name [E]
unchange added/replaced file
* (close)
copy zip file
open copy
rename, delete, replace, add w/ new name, add w/ deleted name
close
zipcmp copy expected
remove copy
* (delete)
* (error_get)
* (error_get_sys_type)
* (error_to_str)
* (extra_fields)
* (file_error_get)
* (file_strerror)
* (fopen_index)
illegal index
* (get_name)
* (get_num_files)
* (rename)
* (replace)
* (source_buffer)
* (source_file)
* (source_filep)
* (source_free)
* (source_function)
* (source_zip)
* (stat)
* (stat_index)
* (strerror)
* (unchange)
* (unchange_all)