zipinfo: support DOS attributes.

golang doesn't include Unix mode by default.

Also show all the deflate variants ("defN" versus "defX").

Cope better with being called directly rather than via symlink.

Test: manual
Change-Id: I23b441c847ce9a557ea866b3c43bdf0542b26f10
diff --git a/libziparchive/zip_archive.cc b/libziparchive/zip_archive.cc
index caf8fae..ef29188 100644
--- a/libziparchive/zip_archive.cc
+++ b/libziparchive/zip_archive.cc
@@ -622,12 +622,16 @@
 
   // 4.4.2.1: the upper byte of `version_made_by` gives the source OS. Unix is 3.
   data->version_made_by = cdr->version_made_by;
+  data->external_file_attributes = cdr->external_file_attributes;
   if ((data->version_made_by >> 8) == 3) {
     data->unix_mode = (cdr->external_file_attributes >> 16) & 0xffff;
   } else {
     data->unix_mode = 0777;
   }
 
+  // 4.4.4: general purpose bit flags.
+  data->gpbf = lfh->gpb_flags;
+
   // 4.4.14: the lowest bit of the internal file attributes field indicates text.
   // Currently only needed to implement zipinfo.
   data->is_text = (cdr->internal_file_attributes & 1);