Skip to content

Releases: kuba--/zip

zip 0.1.6

24 Jul 22:01
ff500b7
Compare
Choose a tag to compare
  • bug fixes
    • memset function will lead to underflow of the buffer
    • Lite fix about build in _MSC_VER (PS)
    • remove wrong if for MSC
  • clang-format
  • update cmake file

zip 0.1.5

08 Mar 19:57
Compare
Choose a tag to compare
  • minor bug fixes
  • new API functions:
/*
  Returns an uncompressed size of the current zip entry.

  Args:
    zip: zip archive handler.

  Returns:
    The uncompressed size in bytes.
*/
extern unsigned long long zip_entry_size(struct zip_t *zip);

/*
  Returns CRC-32 checksum of the current zip entry.

  Args:
    zip: zip archive handler.

  Returns:
    The CRC-32 checksum.
*/
extern unsigned int zip_entry_crc32(struct zip_t *zip);

/*
  Extracts the current zip entry into a memory buffer using no memory allocation.

  Args:
    zip: zip archive handler.
    buf: preallocated output buffer.
    bufsize: output buffer size (in bytes).

  Note:
    - ensure supplied output buffer is large enough.
    - zip_entry_size function (returns uncompressed size for the current entry)
      can be handy to estimate how big buffer is needed.
    - for large entries, please take a look at zip_entry_extract function.

  Returns:
    The return code - 0 on success, negative number (< 0) on error (e.g. bufsize
    is not large enough).
*/
extern int zip_entry_noallocread(struct zip_t *zip, void *buf, size_t bufsize);

zip 0.1.4

09 Jan 07:00
f5b6a91
Compare
Choose a tag to compare
  • minor bug fixes
  • new API functions:
/*
  Opens a new entry by index in the zip archive.
  This function is only valid if zip archive was opened in 'r' (readonly) mode.

  Args:
    zip: zip archive handler.
    index: index in local dictionary.

  Returns:
    The return code - 0 on success, negative number (< 0) on error.
*/
extern int zip_entry_openbyindex(struct zip_t *zip, int index);

/*
  Returns a local name of the current zip entry.
  The main difference between user's entry name and local entry name
  is optional relative path.
  Following .ZIP File Format Specification - the path stored MUST not contain
  a drive or device letter, or a leading slash.
  All slashes MUST be forward slashes '/' as opposed to backwards slashes '\'
  for compatibility with Amiga and UNIX file systems etc.

  Args:
    zip: zip archive handler.

  Returns:
    The pointer to the current zip entry name, or NULL on error.
*/
extern const char *zip_entry_name(struct zip_t *zip);

/*
  Returns an index of the current zip entry.

  Args:
    zip: zip archive handler.

  Returns:
    The index on success, negative number (< 0) on error.
*/
extern int zip_entry_index(struct zip_t *zip);

/*
  Determines if the current zip entry is a directory entry.

  Args:
    zip: zip archive handler.

  Returns:
    The return code - 1 (true), 0 (false), negative number (< 0) on error.
*/
extern int zip_entry_isdir(struct zip_t *zip);

/*
  Returns the number of all entries (files and directories) in the zip archive.

  Args:
    zip: zip archive handler.

  Returns:
    The return code - the number of entries on success,
    negative number (< 0) on error.
*/
extern int zip_total_entries(struct zip_t *zip);

zip 0.1.3

09 Nov 09:58
75e307f
Compare
Choose a tag to compare
  • minor bug fixes.

zip 0.1.2

21 Jul 08:48
Compare
Choose a tag to compare
  • zip_extract bug fix.

zip 0.1.1

16 Mar 21:12
Compare
Choose a tag to compare
  • Added zip_entry_extract to extract current zip entry using callback function.

zip 0.1.0

15 Mar 08:44
Compare
Choose a tag to compare

Initial release 0.1.0