Commit graph

5 commits

Author SHA1 Message Date
Mark Salyzyn
51d562d399 libziparchive: Turn on -Werror
Change-Id: I98a93273b9e1bac0324dd210f6a8493ba780e878
2014-05-07 16:56:21 -07:00
Narayan Kamath
95986aae91 Fix a sporadic build breakage.
The issue here is that the makefile sets LOCAL_LDFLAGS
and asks for -llog without declaring a dependency on it.
This will cause build breakages if liblog hasn't already
been built yet.

Change-Id: Ia38761cda44a38b6c2a88902d6108cbe64a328ce
2014-01-03 15:40:37 +00:00
Narayan Kamath
eaf988532b Use FileMap from libcutil instead of rolling our own.
Adds windows support as a side effect.

Change-Id: I912c1f980f284d01d4f3936291999646ddf6250a
2013-12-11 15:17:06 +00:00
Narayan Kamath
58aaf46e4d Add unit tests for libziparchive.
- Add a build rule for host tests
- Add basic tests for Find / Iterate and Extract
  for both deflated & stored entries.
- Fix an off by one error that the test uncovered.

Change-Id: If72009b1ea9791d5a265829f05c32ffe1c2752c4
2013-12-10 16:48:50 +00:00
Narayan Kamath
7462f02f82 Unify zipfile implementations : Step 1.
Extract zip file processing logic from libdvm into a
standalone library.

This library is a stricter than the libdvm library in
several ways:
- Duplicate zip entry names are now disallowed. Files with
  such entries will fail to parse.
- We now verify CD file size information with the individual
  file header information. (This was pointed out as a deficiency
  of this implementation in past discussions.)
- We also add support for crc checking, which means we might
  need to parse the optional data descriptor footer (if one
  exists).

We also provide an API for iterating over the entries of
a zip file. This library is optimized for two use cases :

- Lookup for a single entry in the file, with the intention
  of processing or extracting the data associated with that
  entry
- Iterating over all entries in a file *and* processing
  / extracting their data.

Change-Id: Ia87de6184ef753cc470b0af755c47a4f92ac8198
2013-12-04 13:28:40 +00:00