libmspack 0.0.5 → 0.10.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/.github/workflows/rake.yml +37 -0
- data/.gitignore +2 -0
- data/.yardopts +1 -1
- data/README.md +1 -1
- data/Rakefile +11 -5
- data/ext/Rakefile +1 -1
- data/ext/libmspack/AUTHORS +1 -0
- data/ext/libmspack/ChangeLog +321 -4
- data/ext/libmspack/INSTALL +368 -0
- data/ext/libmspack/Makefile.am +86 -95
- data/ext/libmspack/Makefile.in +1729 -0
- data/ext/libmspack/README +30 -30
- data/ext/libmspack/acinclude.m4 +99 -0
- data/ext/libmspack/aclocal.m4 +1218 -0
- data/ext/libmspack/ar-lib +270 -0
- data/ext/libmspack/compile +347 -0
- data/ext/libmspack/config.guess +1480 -0
- data/ext/libmspack/config.h.in +129 -0
- data/ext/libmspack/config.sub +1801 -0
- data/ext/libmspack/configure +15487 -0
- data/ext/libmspack/configure.ac +11 -13
- data/ext/libmspack/depcomp +791 -0
- data/ext/libmspack/install-sh +508 -0
- data/ext/libmspack/libmscabd.la +41 -0
- data/ext/libmspack/libmschmd.la +41 -0
- data/ext/libmspack/libmspack.la +41 -0
- data/ext/libmspack/ltmain.sh +11156 -0
- data/ext/libmspack/m4/libtool.m4 +8387 -0
- data/ext/libmspack/m4/ltoptions.m4 +437 -0
- data/ext/libmspack/m4/ltsugar.m4 +124 -0
- data/ext/libmspack/m4/ltversion.m4 +23 -0
- data/ext/libmspack/m4/lt~obsolete.m4 +99 -0
- data/ext/libmspack/missing +215 -0
- data/ext/libmspack/mspack/cab.h +20 -7
- data/ext/libmspack/mspack/cabd.c +301 -236
- data/ext/libmspack/mspack/chmd.c +304 -319
- data/ext/libmspack/mspack/crc32.c +52 -52
- data/ext/libmspack/mspack/crc32.h +1 -1
- data/ext/libmspack/mspack/kwajd.c +178 -172
- data/ext/libmspack/mspack/lzss.h +4 -4
- data/ext/libmspack/mspack/lzssd.c +42 -42
- data/ext/libmspack/mspack/lzx.h +11 -11
- data/ext/libmspack/mspack/lzxd.c +370 -361
- data/ext/libmspack/mspack/mspack.h +109 -77
- data/ext/libmspack/mspack/mszip.h +6 -6
- data/ext/libmspack/mspack/mszipd.c +140 -139
- data/ext/libmspack/mspack/oab.h +1 -0
- data/ext/libmspack/mspack/oabd.c +71 -73
- data/ext/libmspack/mspack/qtm.h +4 -4
- data/ext/libmspack/mspack/qtmd.c +118 -117
- data/ext/libmspack/mspack/readbits.h +52 -52
- data/ext/libmspack/mspack/readhuff.h +61 -61
- data/ext/libmspack/mspack/system.c +15 -9
- data/ext/libmspack/mspack/system.h +38 -50
- data/ext/libmspack/mspack/szddd.c +35 -35
- data/ext/libmspack/test-driver +148 -0
- data/ext/x86_64-linux/libmspack.so +0 -0
- data/ext/x86_64-windows/mspack.dll +0 -0
- data/lib/libmspack/version.rb +2 -1
- data/lib/libmspack.rb +1 -1
- data/libmspack.gemspec +4 -4
- data/spec/libmspack_spec.rb +5 -4
- metadata +38 -105
- data/.travis.yml +0 -5
- data/ext/i386-windows/libmspack.dll +0 -0
- data/ext/libmspack/cleanup.sh +0 -9
- data/ext/libmspack/debian/changelog +0 -6
- data/ext/libmspack/debian/control +0 -14
- data/ext/libmspack/debian/rules +0 -101
- data/ext/libmspack/doc/Doxyfile.in +0 -22
- data/ext/libmspack/doc/Makefile.in +0 -14
- data/ext/libmspack/doc/szdd_kwaj_format.html +0 -331
- data/ext/libmspack/mspack/mspack.def +0 -28
- data/ext/libmspack/mspack/qtmc.c +0 -18
- data/ext/libmspack/rebuild.sh +0 -8
- data/ext/libmspack/test/cabd_c10 +0 -19
- data/ext/libmspack/test/cabd_compare +0 -34
- data/ext/libmspack/test/cabd_md5.c +0 -161
- data/ext/libmspack/test/cabd_memory.c +0 -179
- data/ext/libmspack/test/cabd_test.c +0 -386
- data/ext/libmspack/test/cabrip.c +0 -81
- data/ext/libmspack/test/chmd_compare +0 -38
- data/ext/libmspack/test/chmd_find.c +0 -95
- data/ext/libmspack/test/chmd_md5.c +0 -67
- data/ext/libmspack/test/chmd_order.c +0 -144
- data/ext/libmspack/test/chminfo.c +0 -284
- data/ext/libmspack/test/chmx.c +0 -216
- data/ext/libmspack/test/error.h +0 -22
- data/ext/libmspack/test/expand.c +0 -79
- data/ext/libmspack/test/md5.c +0 -457
- data/ext/libmspack/test/md5.h +0 -165
- data/ext/libmspack/test/md5_fh.h +0 -123
- data/ext/libmspack/test/msdecompile_md5 +0 -24
- data/ext/libmspack/test/msexpand_md5 +0 -39
- data/ext/libmspack/test/multifh.c +0 -435
- data/ext/libmspack/test/oabx.c +0 -41
- data/ext/libmspack/test/test_files/cabd/1.pl +0 -84
- data/ext/libmspack/test/test_files/cabd/2.pl +0 -75
- data/ext/libmspack/test/test_files/cabd/bad_folderindex.cab +0 -0
- data/ext/libmspack/test/test_files/cabd/bad_nofiles.cab +0 -0
- data/ext/libmspack/test/test_files/cabd/bad_nofolders.cab +0 -0
- data/ext/libmspack/test/test_files/cabd/bad_signature.cab +0 -0
- data/ext/libmspack/test/test_files/cabd/multi_basic_pt1.cab +0 -0
- data/ext/libmspack/test/test_files/cabd/multi_basic_pt2.cab +0 -0
- data/ext/libmspack/test/test_files/cabd/multi_basic_pt3.cab +0 -0
- data/ext/libmspack/test/test_files/cabd/multi_basic_pt4.cab +0 -0
- data/ext/libmspack/test/test_files/cabd/multi_basic_pt5.cab +0 -0
- data/ext/libmspack/test/test_files/cabd/normal_255c_filename.cab +0 -0
- data/ext/libmspack/test/test_files/cabd/normal_2files_1folder.cab +0 -0
- data/ext/libmspack/test/test_files/cabd/partial_nodata.cab +0 -0
- data/ext/libmspack/test/test_files/cabd/partial_nofiles.cab +0 -0
- data/ext/libmspack/test/test_files/cabd/partial_nofolder.cab +0 -0
- data/ext/libmspack/test/test_files/cabd/partial_shortextheader.cab +0 -0
- data/ext/libmspack/test/test_files/cabd/partial_shortfile1.cab +0 -0
- data/ext/libmspack/test/test_files/cabd/partial_shortfile2.cab +0 -0
- data/ext/libmspack/test/test_files/cabd/partial_shortfolder.cab +0 -0
- data/ext/libmspack/test/test_files/cabd/partial_shortheader.cab +0 -0
- data/ext/libmspack/test/test_files/cabd/partial_str_nofname.cab +0 -0
- data/ext/libmspack/test/test_files/cabd/partial_str_noninfo.cab +0 -0
- data/ext/libmspack/test/test_files/cabd/partial_str_nonname.cab +0 -0
- data/ext/libmspack/test/test_files/cabd/partial_str_nopinfo.cab +0 -0
- data/ext/libmspack/test/test_files/cabd/partial_str_nopname.cab +0 -0
- data/ext/libmspack/test/test_files/cabd/partial_str_shortfname.cab +0 -0
- data/ext/libmspack/test/test_files/cabd/partial_str_shortninfo.cab +0 -0
- data/ext/libmspack/test/test_files/cabd/partial_str_shortnname.cab +0 -0
- data/ext/libmspack/test/test_files/cabd/partial_str_shortpinfo.cab +0 -0
- data/ext/libmspack/test/test_files/cabd/partial_str_shortpname.cab +0 -0
- data/ext/libmspack/test/test_files/cabd/reserve_---.cab +0 -0
- data/ext/libmspack/test/test_files/cabd/reserve_--D.cab +0 -0
- data/ext/libmspack/test/test_files/cabd/reserve_-F-.cab +0 -0
- data/ext/libmspack/test/test_files/cabd/reserve_-FD.cab +0 -0
- data/ext/libmspack/test/test_files/cabd/reserve_H--.cab +0 -0
- data/ext/libmspack/test/test_files/cabd/reserve_H-D.cab +0 -0
- data/ext/libmspack/test/test_files/cabd/reserve_HF-.cab +0 -0
- data/ext/libmspack/test/test_files/cabd/reserve_HFD.cab +0 -0
- data/ext/libmspack/test/test_files/cabd/search_basic.cab +0 -0
- data/ext/libmspack/test/test_files/cabd/search_tricky1.cab +0 -0
- data/ext/libmspack/winbuild.sh +0 -26
- data/ext/libmspack.h +0 -259
- data/ext/x86_64-windows/libmspack.dll +0 -0
data/ext/libmspack/README
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
libmspack 0.
|
|
1
|
+
libmspack 0.10.1alpha
|
|
2
2
|
|
|
3
3
|
The purpose of libmspack is to provide compressors and decompressors,
|
|
4
4
|
archivers and dearchivers for Microsoft compression formats: CAB, CHM, WIM,
|
|
@@ -24,7 +24,7 @@ DOCUMENTATION
|
|
|
24
24
|
|
|
25
25
|
The API documentation is stored in the doc/ directory. It is generated
|
|
26
26
|
automatically from mspack.h with doxygen. It is also available online at
|
|
27
|
-
|
|
27
|
+
https://www.cabextract.org.uk/libmspack/doc/
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
BUILDING / INSTALLING
|
|
@@ -36,15 +36,14 @@ make install
|
|
|
36
36
|
This will install the main libmspack library and mspack.h header file.
|
|
37
37
|
Some other libraries and executables are built, but not installed.
|
|
38
38
|
|
|
39
|
-
If building from the
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
a thorough clean, deleting all automatically generated files.
|
|
39
|
+
If building from the Git repository, running rebuild.sh will create all the
|
|
40
|
+
auto-generated files, then run ./configure && make. Running cleanup.sh will
|
|
41
|
+
perform a thorough clean, deleting all auto-generated files.
|
|
43
42
|
|
|
44
|
-
In addition to gcc, you also need the following for building from
|
|
43
|
+
In addition to gcc, you also need the following for building from repository:
|
|
45
44
|
|
|
46
45
|
- at least autoconf 2.57
|
|
47
|
-
- at least automake 1.
|
|
46
|
+
- at least automake 1.11
|
|
48
47
|
- libtool
|
|
49
48
|
|
|
50
49
|
This is an alpha release. Unless you are in a position to package the
|
|
@@ -56,7 +55,7 @@ source files directly in your application's build environment.
|
|
|
56
55
|
|
|
57
56
|
LEGAL ISSUES
|
|
58
57
|
|
|
59
|
-
|
|
58
|
+
To the best of my knowledge, libmspack does not infringe on any
|
|
60
59
|
compression or decompression patents. However, this is not legal
|
|
61
60
|
advice, and it is recommended that you perform your own patent search.
|
|
62
61
|
|
|
@@ -78,27 +77,28 @@ provided you meet ALL of the following conditions:
|
|
|
78
77
|
|
|
79
78
|
EXAMPLE CODE
|
|
80
79
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
80
|
+
libmspack is bundled with programs which demonstrate the library's features.
|
|
81
|
+
|
|
82
|
+
examples/cabd_memory.c - an mspack_system that can read and write to memory
|
|
83
|
+
examples/multifh.c - an mspack_system that can simultaneously work on
|
|
84
|
+
in-memory images, raw file descriptors, open file
|
|
85
|
+
handles and regular disk files
|
|
86
|
+
|
|
87
|
+
examples/cabrip.c - extracts any CAB files embedded in another file
|
|
88
|
+
examples/chmextract.c - extracts all files in a CHM file to disk
|
|
89
|
+
examples/msexpand.c - expands an SZDD or KWAJ file
|
|
90
|
+
examples/oabextract.c - extracts an Exchange Offline Address Book (.LZX) file
|
|
91
|
+
|
|
92
|
+
test/cabd_c10 - tests the CAB decompressor on the C10 collection
|
|
93
|
+
test/cabd_compare - compares libmspack with Microsoft's EXTRACT.EXE
|
|
94
|
+
test/cabd_md5 - shows MD5 checksums of all files in a CAB file/set
|
|
95
|
+
test/chmd_compare - compares libmspack with Microsoft's HH.EXE
|
|
96
|
+
test/chmd_find.c - checks all files in a CHM file can be fast-found
|
|
97
|
+
test/chmd_md5.c - shows MD5 checksums of all files within a CHM file
|
|
98
|
+
test/chmd_order.c - extracts files in a CHM file in four different ways
|
|
99
|
+
test/chminfo.c - prints verbose information about CHM file structures
|
|
100
|
+
test/msdecompile_md5 - runs Microsoft's HH.EXE -DECOMPILE via WINE
|
|
101
|
+
test/msextract_md5 - runs Microsoft's EXTRACT.EXE via WINE
|
|
102
102
|
|
|
103
103
|
Here is a simple example of usage, which will create a CAB decompressor,
|
|
104
104
|
then use that to open an existing Microsoft CAB file called "example.cab",
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# ===========================================================================
|
|
2
|
+
# https://www.gnu.org/software/autoconf-archive/ax_func_mkdir.html
|
|
3
|
+
# ===========================================================================
|
|
4
|
+
#
|
|
5
|
+
# SYNOPSIS
|
|
6
|
+
#
|
|
7
|
+
# AX_FUNC_MKDIR
|
|
8
|
+
#
|
|
9
|
+
# DESCRIPTION
|
|
10
|
+
#
|
|
11
|
+
# Check whether mkdir() is mkdir or _mkdir, and whether it takes one or
|
|
12
|
+
# two arguments.
|
|
13
|
+
#
|
|
14
|
+
# This macro can define HAVE_MKDIR, HAVE__MKDIR, and MKDIR_TAKES_ONE_ARG,
|
|
15
|
+
# which are expected to be used as follows:
|
|
16
|
+
#
|
|
17
|
+
# #if HAVE_MKDIR
|
|
18
|
+
# # if MKDIR_TAKES_ONE_ARG
|
|
19
|
+
# /* MinGW32 */
|
|
20
|
+
# # define mkdir(a, b) mkdir(a)
|
|
21
|
+
# # endif
|
|
22
|
+
# #else
|
|
23
|
+
# # if HAVE__MKDIR
|
|
24
|
+
# /* plain Windows 32 */
|
|
25
|
+
# # define mkdir(a, b) _mkdir(a)
|
|
26
|
+
# # else
|
|
27
|
+
# # error "Don't know how to create a directory on this system."
|
|
28
|
+
# # endif
|
|
29
|
+
# #endif
|
|
30
|
+
#
|
|
31
|
+
# LICENSE
|
|
32
|
+
#
|
|
33
|
+
# Copyright (c) 2008 Alexandre Duret-Lutz <adl@gnu.org>
|
|
34
|
+
#
|
|
35
|
+
# This program is free software; you can redistribute it and/or modify it
|
|
36
|
+
# under the terms of the GNU General Public License as published by the
|
|
37
|
+
# Free Software Foundation; either version 2 of the License, or (at your
|
|
38
|
+
# option) any later version.
|
|
39
|
+
#
|
|
40
|
+
# This program is distributed in the hope that it will be useful, but
|
|
41
|
+
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
42
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
|
43
|
+
# Public License for more details.
|
|
44
|
+
#
|
|
45
|
+
# You should have received a copy of the GNU General Public License along
|
|
46
|
+
# with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
47
|
+
#
|
|
48
|
+
# As a special exception, the respective Autoconf Macro's copyright owner
|
|
49
|
+
# gives unlimited permission to copy, distribute and modify the configure
|
|
50
|
+
# scripts that are the output of Autoconf when processing the Macro. You
|
|
51
|
+
# need not follow the terms of the GNU General Public License when using
|
|
52
|
+
# or distributing such scripts, even though portions of the text of the
|
|
53
|
+
# Macro appear in them. The GNU General Public License (GPL) does govern
|
|
54
|
+
# all other use of the material that constitutes the Autoconf Macro.
|
|
55
|
+
#
|
|
56
|
+
# This special exception to the GPL applies to versions of the Autoconf
|
|
57
|
+
# Macro released by the Autoconf Archive. When you make and distribute a
|
|
58
|
+
# modified version of the Autoconf Macro, you may extend this special
|
|
59
|
+
# exception to the GPL to apply to your modified version as well.
|
|
60
|
+
|
|
61
|
+
#serial 6
|
|
62
|
+
|
|
63
|
+
AU_ALIAS([AC_FUNC_MKDIR], [AX_FUNC_MKDIR])
|
|
64
|
+
AC_DEFUN([AX_FUNC_MKDIR],
|
|
65
|
+
[AC_CHECK_FUNCS([mkdir _mkdir])
|
|
66
|
+
AC_CACHE_CHECK([whether mkdir takes one argument],
|
|
67
|
+
[ac_cv_mkdir_takes_one_arg],
|
|
68
|
+
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
69
|
+
#include <sys/stat.h>
|
|
70
|
+
#if HAVE_UNISTD_H
|
|
71
|
+
# include <unistd.h>
|
|
72
|
+
#endif
|
|
73
|
+
]], [[mkdir (".");]])],
|
|
74
|
+
[ac_cv_mkdir_takes_one_arg=yes], [ac_cv_mkdir_takes_one_arg=no])])
|
|
75
|
+
if test x"$ac_cv_mkdir_takes_one_arg" = xyes; then
|
|
76
|
+
AC_DEFINE([MKDIR_TAKES_ONE_ARG], 1,
|
|
77
|
+
[Define if mkdir takes only one argument.])
|
|
78
|
+
fi
|
|
79
|
+
])
|
|
80
|
+
|
|
81
|
+
dnl Note:
|
|
82
|
+
dnl =====
|
|
83
|
+
dnl I have not implemented the following suggestion because I don't have
|
|
84
|
+
dnl access to such a broken environment to test the macro. So I'm just
|
|
85
|
+
dnl appending the comments here in case you have, and want to fix
|
|
86
|
+
dnl AX_FUNC_MKDIR that way.
|
|
87
|
+
dnl
|
|
88
|
+
dnl |Thomas E. Dickey (dickey@herndon4.his.com) said:
|
|
89
|
+
dnl | it doesn't cover the problem areas (compilers that mistreat mkdir
|
|
90
|
+
dnl | may prototype it in dir.h and dirent.h, for instance).
|
|
91
|
+
dnl |
|
|
92
|
+
dnl |Alexandre:
|
|
93
|
+
dnl | Would it be sufficient to check for these headers and #include
|
|
94
|
+
dnl | them in the AC_COMPILE_IFELSE block? (and is AC_HEADER_DIRENT
|
|
95
|
+
dnl | suitable for this?)
|
|
96
|
+
dnl |
|
|
97
|
+
dnl |Thomas:
|
|
98
|
+
dnl | I think that might be a good starting point (with the set of recommended
|
|
99
|
+
dnl | ifdef's and includes for AC_HEADER_DIRENT, of course).
|