guzba / zippy

Pure Nim implementation of deflate, zlib, gzip and zip.
MIT License
246 stars 29 forks source link

when zip extracted with zippy extra garbage data is added to end of some files #19

Closed ftsf closed 3 years ago

ftsf commented 3 years ago

control using : unzip UnZip 6.00 of 20 April 2009, by Info-ZIP. Maintained by C. Spieler. Send bug reports using http://www.info-zip.org/zip-bug.html; see README for details.

zippy: 0.5.7

experienced with this zip file: https://impbox.net/nico/android.zip (3MB)

It appears the extra data may be coming from the file names, running zippy over the same file multiple times gives different results in the extra data.

using extractAll("android.zip", "zippy/android")

diff -ur unzip/android/ zippy/android/

diff -ur unzip/android/ zippy/android/
diff -ur unzip/android/app/jni/SDL/src/hidapi/android/jni/Application.mk zippy/android/app/jni/SDL/src/hidapi/android/jni/Application.mk
--- unzip/android/app/jni/SDL/src/hidapi/android/jni/Application.mk     2020-07-17 15:10:36.000000000 +1000
+++ zippy/android/app/jni/SDL/src/hidapi/android/jni/Application.mk     2021-05-08 09:06:37.330885000 +1000
@@ -1,2 +1,3 @@
 APP_STL := gnustl_static
 APP_ABI := armeabi-v7a
+▒riptenaudio.h
\ No newline at end of file
diff -ur unzip/android/app/jni/SDL/src/hidapi/bootstrap zippy/android/app/jni/SDL/src/hidapi/bootstrap
--- unzip/android/app/jni/SDL/src/hidapi/bootstrap      2020-07-17 15:10:36.000000000 +1000
+++ zippy/android/app/jni/SDL/src/hidapi/bootstrap      2021-05-08 09:06:37.333887400 +1000
@@ -1,2 +1,4 @@
 #!/bin/sh -x
 autoreconf --install --verbose --force
+e, 1);
+    }
\ No newline at end of file
diff -ur unzip/android/app/jni/SDL/src/hidapi/libusb/hidusb.cpp zippy/android/app/jni/SDL/src/hidapi/libusb/hidusb.cpp
--- unzip/android/app/jni/SDL/src/hidapi/libusb/hidusb.cpp      2020-07-17 15:10:36.000000000 +1000
+++ zippy/android/app/jni/SDL/src/hidapi/libusb/hidusb.cpp      2021-05-08 09:06:37.357888200 +1000
@@ -1,3 +1,4 @@

 #define NAMESPACE HIDUSB
 #include "hid.c"
+c
\ No newline at end of file
diff -ur unzip/android/app/jni/SDL/src/hidapi/linux/hidraw.cpp zippy/android/app/jni/SDL/src/hidapi/linux/hidraw.cpp
--- unzip/android/app/jni/SDL/src/hidapi/linux/hidraw.cpp       2020-07-17 15:10:36.000000000 +1000
+++ zippy/android/app/jni/SDL/src/hidapi/linux/hidraw.cpp       2021-05-08 09:06:37.371886400 +1000
@@ -1,3 +1,4 @@

 #define NAMESPACE HIDRAW
 #include "hid.c"
+e.h
\ No newline at end of file
Only in unzip/android/app/src/main: AndroidManifest.xml
Binary files unzip/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and zippy/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ
Binary files unzip/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and zippy/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ
Binary files unzip/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and zippy/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ
Only in unzip/android/app/src/main/res/values: strings.xml
diff -ur unzip/android/settings.gradle zippy/android/settings.gradle
--- unzip/android/settings.gradle       2020-07-17 15:10:40.000000000 +1000
+++ zippy/android/settings.gradle       2021-05-08 09:06:38.497886400 +1000
@@ -1 +1,2 @@
 include ':app'
+
\ No newline at end of file
guzba commented 3 years ago

Thanks for the report. I'll take a look.

guzba commented 3 years ago

This should be fixed in 0.5.9 which I just tagged. Crazy issue with slices but it seems to be sorted out.