Compare commits

...

5 Commits
v1.0 ... master

Author SHA1 Message Date
Nicolas Arenas 2efad8b7c2 Remove compat file 2025-07-04 15:11:01 +02:00
Nicolas Arenas a37f5a6665 Add debian packaging dir 2025-07-04 15:06:42 +02:00
Eric Biggers 53f7bcba9c Use MIT license instead of CC0
Following the same commit from wimlib
(https://wimlib.net/git/?p=wimlib;a=commit;h=41a9a2a95bd357a344be95d2ac3c370aadac3846),
use the MIT license for decompress_common.c and decompress_common.h
instead of CC0.
2024-02-19 12:05:31 -08:00
Eric Biggers a9f42a1556 Fix build error with gcc 14
Ensure that time.h gets included.  This fixes the following build error:

    In file included from /usr/include/ntfs-3g/inode.h:35,
                     from /usr/include/ntfs-3g/attrib.h:33,
                     from src/system_compression.c:64:
    /usr/include/ntfs-3g/ntfstime.h: In function 'ntfs_current_time':
    /usr/include/ntfs-3g/ntfstime.h:125:22: error: implicit declaration of function 'time' [-Wimplicit-function-declaration]
      125 |         now.tv_sec = time((time_t*)NULL);
          |                      ^~~~
2024-02-19 11:56:44 -08:00
Eric Biggers f27f924c1e Avoid -Waddress-of-packed-member warning
Add __attribute__((packed)) to the on-disk reparse point structures to
avoid a compiler warning about a potential unaligned pointer when
casting a pointer to REPARSE_POINT (which is defined in
<ntfs-3g/layout.h> using __attribute__((packed))) to a pointer to
WOF_FILE_PROVIDER_REPARSE_POINT_V1.

This warning is probably a false positive since the REPARSE_POINT from
NTFS-3G should be aligned in practice.  But we shouldn't assume that.
2020-08-24 21:36:33 -07:00
10 changed files with 93 additions and 32 deletions

View File

@ -47,10 +47,8 @@ The XPRESS and LZX compression formats used in system-compressed files are
identical to the formats used in Windows Imaging (WIM) archives. Therefore, for
the system compression plugin I borrowed the XPRESS and LZX decompressors I had
already written for the wimlib project (https://wimlib.net/). I made some
slight modifications for integration purposes. The code in wimlib is currently
licensed LGPLv3+, but I have relicensed the version in this plugin to GPLv2+ for
consistency with NTFS-3G's license. (Public domain portions remain public
domain.)
slight modifications for integration purposes, and I relicensed the files that
used the LGPLv3+ license to GPLv2+ for compatibility with NTFS-3G's license.
# Notices

View File

@ -21,7 +21,8 @@ AC_CHECK_HEADERS([errno.h \
stddef.h \
stdlib.h \
string.h \
sys/types.h])
sys/types.h \
time.h])
PKG_CHECK_MODULES([LIBNTFS_3G], [libntfs-3g >= 2017.3.23], [],
[AC_MSG_ERROR(["Unable to find libntfs-3g"])])

5
debian/changelog vendored 100644
View File

@ -0,0 +1,5 @@
ntfs-3g-system-compression (1.0-1) unstable; urgency=medium
* Initial release.
-- Nicolas Arenas <narenas@qindel.com> Thu, 04 Jul 2025 12:00:00 +0000

15
debian/control vendored 100644
View File

@ -0,0 +1,15 @@
Source: ntfs-3g-system-compression
Section: utils
Priority: optional
Maintainer: Nicolas Arenas <narenas@qindel.com>
Build-Depends: debhelper-compat (= 13), autoconf, automake, libtool, pkg-config, build-essential, libfuse-dev, ntfs-3g-dev
Standards-Version: 4.6.2
Homepage: https://github.com/ebiggers/ntfs-3g-system-compression
Rules-Requires-Root: no
Package: ntfs-3g-system-compression
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends} , ntfs-3g
Description: Support for reading Windows system-compressed files on NTFS
This library adds support to ntfs-3g for reading files compressed
with Windows system compression (LZX algorithm).

16
debian/copyright vendored 100644
View File

@ -0,0 +1,16 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: ntfs-3g-system-compression
Source: https://github.com/ebiggers/ntfs-3g-system-compression
Files: *
Copyright: 2016 Eric Biggers
License: GPL-2+
License: GPL-2+
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
.
On Debian systems, the complete text of the GNU General
Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".

11
debian/rules vendored 100644
View File

@ -0,0 +1,11 @@
#!/usr/bin/make -f
%:
dh $@
override_dh_auto_configure:
autoreconf -i
./configure --prefix=/usr
override_dh_auto_install:
$(MAKE) install DESTDIR=$(CURDIR)/debian/ntfs-3g-system-compression

1
debian/source/format vendored 100644
View File

@ -0,0 +1 @@
3.0 (native)

View File

@ -3,21 +3,28 @@
*
* Code for decompression shared among multiple compression formats.
*
* The following copying information applies to this specific source code file:
* Copyright 2022 Eric Biggers
*
* Written in 2012-2016 by Eric Biggers <ebiggers3@gmail.com>
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use,
* copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following
* conditions:
*
* To the extent possible under law, the author(s) have dedicated all copyright
* and related and neighboring rights to this software to the public domain
* worldwide via the Creative Commons Zero 1.0 Universal Public Domain
* Dedication (the "CC0").
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* This software is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the CC0 for more details.
*
* You should have received a copy of the CC0 along with this software; if not
* see <http://creativecommons.org/publicdomain/zero/1.0/>.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*/
#ifdef HAVE_CONFIG_H

View File

@ -3,21 +3,28 @@
*
* Header for decompression code shared by multiple compression formats.
*
* The following copying information applies to this specific source code file:
* Copyright 2022 Eric Biggers
*
* Written in 2012-2016 by Eric Biggers <ebiggers3@gmail.com>
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use,
* copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following
* conditions:
*
* To the extent possible under law, the author(s) have dedicated all copyright
* and related and neighboring rights to this software to the public domain
* worldwide via the Creative Commons Zero 1.0 Universal Public Domain
* Dedication (the "CC0").
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* This software is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the CC0 for more details.
*
* You should have received a copy of the CC0 along with this software; if not
* see <http://creativecommons.org/publicdomain/zero/1.0/>.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef _DECOMPRESS_COMMON_H

View File

@ -92,14 +92,14 @@ typedef enum {
typedef struct {
le32 version;
le32 provider;
} WOF_EXTERNAL_INFO;
} __attribute__((packed)) WOF_EXTERNAL_INFO;
/* Metadata for the compressed file provider --- indicates how the file
* is compressed */
typedef struct {
le32 version;
le32 compression_format;
} WOF_FILE_PROVIDER_EXTERNAL_INFO_V1;
} __attribute__((packed)) WOF_FILE_PROVIDER_EXTERNAL_INFO_V1;
/* Format of the reparse point attribute of system compressed files */
typedef struct {
@ -114,7 +114,7 @@ typedef struct {
/* The metadata specific to the compressed file "provider" */
WOF_FILE_PROVIDER_EXTERNAL_INFO_V1 file;
} WOF_FILE_PROVIDER_REPARSE_POINT_V1;
} __attribute__((packed)) WOF_FILE_PROVIDER_REPARSE_POINT_V1;
/* The available compression formats for system compressed files */
typedef enum {