Code Monkey home page Code Monkey logo

sskaje / unzip-lzfse Goto Github PK

View Code? Open in Web Editor NEW
73.0 7.0 13.0 1.38 MB

Adding lzfse support for unzip-6.0

Home Page: https://sskaje.me/2017/08/unzip-with-lzfse-support/

License: Other

CMake 0.42% C 79.86% Makefile 4.00% Assembly 2.16% C++ 6.71% DIGITAL Command Language 1.14% Module Management System 1.60% WebAssembly 0.48% IDL 0.01% Max 0.08% Batchfile 0.22% Shell 0.13% Objective-C 0.15% RUNOFF 0.39% C# 1.51% Visual Basic 1.15%
lzfse zip unzip

unzip-lzfse's Introduction

Unzip with lzfse

This project is modified based on unzip-6.0

Read more: https://sskaje.me/2017/08/unzip-with-lzfse-support/

Build

Build lzfse

$ git clone https://github.com/lzfse/lzfse.git
$ cd lzfse
$ make
$ sudo make install

Build unzip-lzfse

$ git clone https://github.com/sskaje/unzip-lzfse
$ cd unzip-lzfse
$ git checkout lzfse
$ export LZFSE_PATH=/usr/local
$ make -f unix/Makefile all

Usage

try

unzip -h

e.g.

#unzip with lzfs
$ ./unzip -d dst pre-thinned2490830240475770608.thinned.signed.dpkg.ipa 
Archive:  pre-thinned2490830240475770608.thinned.signed.dpkg.ipa
   creating: dst/META-INF/
  unlzfsing: dst/META-INF/com.apple.ZipMetadata.plist  
 extracting: dst/META-INF/com.apple.FixedZipMetadata.bin  
   creating: dst/Payload/

#unzip
$ unzip -d dst pre-thinned2490830240475770608.thinned.signed.dpkg.ipa 
Archive:  pre-thinned2490830240475770608.thinned.signed.dpkg.ipa
   skipping: META-INF/com.apple.ZipMetadata.plist  unsupported compression method 99
   ...
   creating: dst/META-INF/
 extracting: dst/META-INF/com.apple.FixedZipMetadata.bin  
   creating: dst/Payload/

unzip-lzfse's People

Contributors

sskaje avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

unzip-lzfse's Issues

Could not be compiled under ubuntu 16

Got below link errors

unix.c:(.text+0x186c): warning: lchmod is not implemented and will always fail
extract.o: In function `extract_or_test_entrylist':
extract.c:(.text+0x1c08): undefined reference to `lzfse_decode_buffer'
extract.o: In function `UZlzfse_decode':
extract.c:(.text+0x4bd0): undefined reference to `lzfse_decode_buffer'
collect2: error: ld returned 1 exit status
unix/Makefile:283: recipe for target 'unzip' failed
make[1]: *** [unzip] Error 1
make[1]: Leaving directory '/home/x1/lzfse/unzip-lzfse'
unix/Makefile:544: recipe for target 'generic' failed
make: *** [generic] Error 2

Could you tell me how to fix it? Thanks in advance.

start of central directory not found; zipfile corrupt.

I followed the install instructions but when I try and unzip this IPA file I found I get this error.

Archive:  pre-thinned1234.thinned.signed.dpkg.ipa
error [pre-thinned1234.thinned.signed.dpkg.ipa]:  start of central directory not found;
  zipfile corrupt.
  (please check that you have transferred or created the zipfile in the
  appropriate BINARY mode and that you have compiled UnZip properly)

Any idea what I've done wrong? I'm on macOS 10.13.6 (no good reason, just using an old mac)

make -f unix/Makefile all 发生错误 MACOS 10.15.7

bogon:unzip-lzfse qp$ make -f unix/Makefile all

Attempting "make generic" now. If this fails for some reason, type
"make help" and/or "make list" for suggestions.

eval /Applications/Xcode.app/Contents/Developer/usr/bin/make -f unix/Makefile unzips ACONF_DEP=flags cat flags
cc -c -I. -Ibzip2 -DUNIX -O3 -DLARGE_FILE_SUPPORT -DUNICODE_SUPPORT -DUTF8_MAYBE_NATIVE -DNO_FCHMOD -DNO_FCHOWN -DNO_LCHOWN -DNO_NL_LANGINFO -DNO_LCHMOD -DZMEM -DNO_DIR -DHAVE_DIRENT_H -DHAVE_TERMIOS_H -D_MBCS -DUSE_LZFSE -I/usr/local/include unix/unix.c
In file included from unix/unix.c:31:
In file included from ./unzip.h:718:
./unzpriv.h:1288:11: warning: 'memcpy' macro redefined [-Wmacro-redefined]

define memcpy(dest,src,len) bcopy(src,dest,len)

      ^

/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/secure/_string.h:62:9: note: previous definition is here
#define memcpy(dest, ...)
^
unix/unix.c:132:14: error: typedef redefinition with different types ('FILE' (aka 'struct __sFILE') vs 'struct DIR')
typedef FILE DIR;
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/dirent.h:84:3: note: previous definition is here
} DIR;
^
unix/unix.c:136:2: error: expected ';' after struct
} DIR
^
unix/unix.c:137:4: error: expected ';' after top level declarator
DIR *opendir OF((ZCONST char *dirspec));
^
;
unix/unix.c:138:6: error: conflicting types for 'closedir'
void closedir OF((DIR *dirp));
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/dirent.h:105:5: note: previous declaration is here
int closedir(DIR *) __DARWIN_ALIAS(closedir);
^
unix/unix.c:141:6: error: expected identifier
DIR *opendir(dirspec)
^
unix/unix.c:130:34: note: expanded from macro 'opendir'
#define opendir(path) fopen(path,"r")
^
unix/unix.c:141:6: error: conflicting types for 'fopen'
unix/unix.c:130:23: note: expanded from macro 'opendir'
#define opendir(path) fopen(path,"r")
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdio.h:153:7: note: previous declaration is here
FILE *fopen(const char * __restrict __filename, const char * __restrict __mode) __DARWIN_ALIAS_STARTING(__MAC_10_6, __IPHONE...
^
unix/unix.c:141:22: error: expected ';' after top level declarator
DIR *opendir(dirspec)
^
;
unix/unix.c:143:1: error: expected identifier or '('
{
^
unix/unix.c:155:6: error: conflicting types for 'fclose'
void closedir(dirp)
^
unix/unix.c:131:23: note: expanded from macro 'closedir'
#define closedir(dir) fclose(dir)
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdio.h:143:6: note: previous declaration is here
int fclose(FILE *);
^
unix/unix.c:158:18: error: no member named 'dirhandle' in 'DIR'
fclose(dirp->dirhandle);
~~~~ ^
unix/unix.c:174:27: error: no member named 'entry' in 'DIR'
if (fread(&(dirp->entry), sizeof (struct dirent), 1,
~~~~ ^
unix/unix.c:175:25: error: no member named 'dirhandle' in 'DIR'
dirp->dirhandle) == 0)
~~~~ ^
unix/unix.c:177:25: error: no member named 'entry' in 'DIR'
else if ((dirp->entry).d_ino)
~~~~ ^
unix/unix.c:178:28: error: no member named 'entry' in 'DIR'
return &(dirp->entry);
~~~~ ^
unix/unix.c:257:22: warning: incompatible pointer types passing 'DIR *' to parameter of type 'FILE *' (aka 'struct __sFILE *')
[-Wincompatible-pointer-types]
closedir((DIR *)G.wild_dir);
^~~~~~~~~~~~~~~~~
unix/unix.c:131:30: note: expanded from macro 'closedir'
#define closedir(dir) fclose(dir)
^~~
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdio.h:143:19: note: passing argument to parameter here
int fclose(FILE *);
^
unix/unix.c:298:14: warning: incompatible pointer types passing 'DIR *' to parameter of type 'FILE *' (aka 'struct __sFILE *')
[-Wincompatible-pointer-types]
closedir((DIR )G.wild_dir); / at least one entry read; nothing left */
^~~~~~~~~~~~~~~~~
unix/unix.c:131:30: note: expanded from macro 'closedir'
#define closedir(dir) fclose(dir)
^~~
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdio.h:143:19: note: passing argument to parameter here
int fclose(FILE *);
^
3 warnings and 14 errors generated.
make[1]: *** [unix.o] Error 1
make: *** [generic] Error 2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.