Skip to content

Commit 594cc19

Browse files
committed
Merge branch 'hotfix-4.5.11'
2 parents add1e61 + ff5732a commit 594cc19

14 files changed

Lines changed: 225 additions & 239 deletions

.jazzy.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# Run: sourcekitten doc --spm --module-name SWCompression > docs.json
22
sourcekitten_sourcefile: docs.json
3-
clean: true
3+
clean: false
44
author: Timofey Solomko
55
module: SWCompression
6-
module_version: 4.5.10
6+
module_version: 4.5.11
77
copyright: '© 2021 Timofey Solomko'
88
readme: README.md
99
github_url: https://github.com/tsolomko/SWCompression
10-
github_file_prefix: https://github.com/tsolomko/SWCompression/tree/4.5.10
10+
github_file_prefix: https://github.com/tsolomko/SWCompression/tree/4.5.11
1111
theme: fullwidth
1212

1313
custom_categories:

.travis.yml

Lines changed: 0 additions & 192 deletions
Original file line numberDiff line numberDiff line change
@@ -3,112 +3,7 @@ git:
33
depth: 1
44
submodules: false
55
jobs:
6-
allow_failures:
7-
# There is an issue with Swift 5.4 on Linux which fails the build. See https://bugs.swift.org/browse/SR-14594.
8-
env:
9-
- SWIFT_VERSION=5.4
106
include:
11-
# We test only building using SPM with Swift 4.2 on macos since Carthage doesn't support multiple Swift language versions.
12-
- stage: test
13-
language: swift
14-
os: osx
15-
osx_image: xcode10.1 # Swift 4.2
16-
script:
17-
- swift --version
18-
- swift build
19-
- swift build -c release
20-
- stage: test
21-
language: swift
22-
os: osx
23-
osx_image: xcode10.3 # Swift 5.0
24-
env:
25-
- HOMEBREW_NO_INSTALL_CLEANUP=1
26-
- WATCHOS_ACTIONS='clean build'
27-
- WATCHOS_SIMULATOR='Apple Watch Series 4 - 44mm'
28-
before_install:
29-
- brew update
30-
install:
31-
- ./utils.py ci install-macos
32-
before_script:
33-
- ./utils.py prepare-workspace macos
34-
script:
35-
- ./utils.py ci script-macos
36-
- stage: test
37-
language: swift
38-
os: osx
39-
osx_image: xcode11.3 # Swift 5.1
40-
env:
41-
- HOMEBREW_NO_INSTALL_CLEANUP=1
42-
- WATCHOS_ACTIONS='clean build'
43-
- WATCHOS_SIMULATOR='Apple Watch Series 4 - 44mm'
44-
before_install:
45-
- brew update
46-
install:
47-
- ./utils.py ci install-macos
48-
before_script:
49-
- ./utils.py prepare-workspace macos
50-
script:
51-
- ./utils.py ci script-macos
52-
- stage: test
53-
language: swift
54-
os: osx
55-
osx_image: xcode11.4 # Swift 5.2
56-
env:
57-
- HOMEBREW_NO_INSTALL_CLEANUP=1
58-
- WATCHOS_ACTIONS='clean build'
59-
- WATCHOS_SIMULATOR='Apple Watch Series 4 - 44mm'
60-
before_install:
61-
- brew update
62-
install:
63-
- ./utils.py ci install-macos
64-
before_script:
65-
- ./utils.py prepare-workspace macos
66-
script:
67-
- ./utils.py ci script-macos
68-
- stage: test
69-
# TODO: Remove this stage when the non-xcf installation method with Carthage is no longer supported.
70-
language: swift
71-
os: osx
72-
osx_image: xcode12 # Swift 5.3
73-
env:
74-
- HOMEBREW_NO_INSTALL_CLEANUP=1
75-
- WATCHOS_ACTIONS='clean build'
76-
- WATCHOS_SIMULATOR='Apple Watch Series 6 - 44mm'
77-
before_install:
78-
- brew update
79-
install:
80-
- ./utils.py ci install-macos
81-
before_script:
82-
- xcconfig=$(mktemp /tmp/static.xcconfig.XXXXXX)
83-
- trap 'rm -f "$xcconfig"' INT TERM HUP EXIT
84-
- echo 'EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200 = arm64 arm64e armv7 armv7s armv6 armv8' >> $xcconfig
85-
- echo 'EXCLUDED_ARCHS = $(inherited) $(EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_$(EFFECTIVE_PLATFORM_SUFFIX)__NATIVE_ARCH_64_BIT_$(NATIVE_ARCH_64_BIT)__XCODE_$(XCODE_VERSION_MAJOR))' >> $xcconfig
86-
- export XCODE_XCCONFIG_FILE="$xcconfig"
87-
- carthage bootstrap
88-
- git submodule update --init --recursive
89-
- cp "Tests/Test Files/gitattributes-copy" "Tests/Test Files/.gitattributes"
90-
- cd "Tests/Test Files/"
91-
- git lfs pull
92-
- git lfs checkout
93-
- cd -
94-
script:
95-
- ./utils.py ci script-macos
96-
- stage: test
97-
language: swift
98-
os: osx
99-
osx_image: xcode12.4 # Swift 5.3.2
100-
env:
101-
- HOMEBREW_NO_INSTALL_CLEANUP=1
102-
- WATCHOS_ACTIONS='clean build'
103-
- WATCHOS_SIMULATOR='Apple Watch Series 6 - 44mm'
104-
before_install:
105-
- brew update
106-
install:
107-
- ./utils.py ci install-macos
108-
before_script:
109-
- ./utils.py prepare-workspace macos --xcf
110-
script:
111-
- ./utils.py ci script-macos
1127
- stage: test
1138
language: swift
1149
os: osx
@@ -125,90 +20,3 @@ jobs:
12520
- ./utils.py prepare-workspace macos --xcf
12621
script:
12722
- ./utils.py ci script-macos
128-
- stage: test
129-
language: generic
130-
os: linux
131-
dist: bionic
132-
env:
133-
- SWIFT_VERSION=4.2.3
134-
install:
135-
- ./utils.py ci install-linux
136-
script:
137-
- ./utils.py ci script-linux
138-
- stage: test
139-
language: generic
140-
os: linux
141-
dist: bionic
142-
env:
143-
- SWIFT_VERSION=5.0.3
144-
install:
145-
- ./utils.py ci install-linux
146-
script:
147-
- ./utils.py ci script-linux
148-
- stage: test
149-
language: generic
150-
os: linux
151-
dist: bionic
152-
env:
153-
- SWIFT_VERSION=5.1.5
154-
install:
155-
- ./utils.py ci install-linux
156-
script:
157-
- ./utils.py ci script-linux
158-
- stage: test
159-
language: generic
160-
os: linux
161-
dist: bionic
162-
env:
163-
- SWIFT_VERSION=5.2.5
164-
install:
165-
- ./utils.py ci install-linux
166-
script:
167-
- ./utils.py ci script-linux
168-
- stage: test
169-
language: generic
170-
os: linux
171-
dist: bionic
172-
env:
173-
- SWIFT_VERSION=5.3.3
174-
install:
175-
- ./utils.py ci install-linux
176-
script:
177-
- ./utils.py ci script-linux
178-
- stage: test
179-
language: generic
180-
os: linux
181-
dist: bionic
182-
env:
183-
- SWIFT_VERSION=5.4
184-
install:
185-
- ./utils.py ci install-linux
186-
script:
187-
- ./utils.py ci script-linux
188-
- stage: deploy
189-
# Don't deploy if it is a test release.
190-
if: (tag IS present) AND (tag =~ /^\d+\.\d+\.\d+$/)
191-
language: generic
192-
os: osx
193-
osx_image: xcode12
194-
env:
195-
- HOMEBREW_NO_INSTALL_CLEANUP=1
196-
env:
197-
secure: iavIkrus2Xd3b086nz2srMGl52yqzLuCdhyEAhMODVqkzqMQ17s10y1TNb+vkepd0HgxI9j57d5X7tfChjWuWDwE2hZKjr/Kx2DfiUr1AKQD6ymuGrq/0Vv6yL9dfPU8goFArcrsBcyVKczLtTuLCKL498ZqokkQc/3kGvzW74lv+z410MfHS9/tvToO/yXJckL6qJ2XBAiElfOO0rEkllTeCo6N3bjcHZ2o7PE0K+CHYxwNKj0TmPmuNWZ3U4fzoWzkk01re1C1l5cpSb20g+2aGyi0yYX+PomX7fIIqNq9vmmyoeNdr35yqoQv/0zFeFnps83NKmZLAjSUhiUdhlbuBLBE+w8544LOaZnMDlFmpDjgyaVnRrOh0NrBB1FwU48aGfX5ljRQmk/07FTEUjvwvGGoOpz8lrLZi148FMHEospL3Sf7d8K+Q9WdtLTGk7HCnbOVcxS6oB/SWF/Cj6n5wu+EI1floBaZEsNPR40Gd4eM/Ik/E3lDrZThGDCWQsao981wm7IfEDBR1nuMME8gpZINFANNS1+5miFaGdTnDTp4Yd5MGEFZm+K8x+TG1891NwNH1ZmKXlypJXiUzvSjbh2ViNJGekdQj9q2gj2ZFlCfHJ05adwJ4w9qRuF00HpAOD6At6EnsjDXFJeTZS5dj8fi2YsU9or8KfTFoNY=
198-
addons:
199-
homebrew:
200-
packages:
201-
- sourcekitten
202-
update: true
203-
install:
204-
- gem install -N jazzy
205-
- gem update -N cocoapods
206-
before_deploy:
207-
- ./utils.py ci before-deploy
208-
deploy:
209-
- provider: pages
210-
github_token: $GITHUB_TOKEN
211-
local_dir: docs
212-
skip_cleanup: true
213-
on:
214-
tags: true

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## 4.5.11
4+
5+
- Fixed a crash when processing a truncated TAR file.
6+
- Added missing documentation for `LZMAProperties.init()`.
7+
- Windows is now supported.
8+
39
## 4.5.10
410

511
- Fixed compilation issues on Windows (PR #22 by @trametheka).

README.md

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
[![Swift 5.X](https://img.shields.io/badge/Swift-5.X-blue.svg)](https://developer.apple.com/swift/)
55
[![GitHub license](https://img.shields.io/badge/license-MIT-lightgrey.svg)](https://raw.githubusercontent.com/tsolomko/SWCompression/master/LICENSE)
66
[![Build Status](https://travis-ci.com/tsolomko/SWCompression.svg?branch=develop)](https://travis-ci.com/tsolomko/SWCompression)
7+
[![Build Status](https://dev.azure.com/tsolomko/SWCompression/_apis/build/status/tsolomko.SWCompression?branchName=develop)](https://dev.azure.com/tsolomko/SWCompression/_build/latest?definitionId=3&branchName=develop)
78

89
A framework with (de)compression algorithms and functions for working with various archives and containers.
910

@@ -15,7 +16,7 @@ SWCompression — is a framework with a collection of functions for:
1516
2. Reading (and sometimes writing) archives of different formats.
1617
3. Reading (and sometimes writing) containers such as ZIP, TAR and 7-Zip.
1718

18-
It also works both on Apple platforms and __Linux__.
19+
It also works on Apple platforms, Linux, __and Windows__.
1920

2021
All features are listed in the tables below. "TBD" means that feature is planned but not implemented (yet).
2122

@@ -192,14 +193,12 @@ If you want to run tests on your computer, you need to do an additional step aft
192193
```
193194

194195
The argument of this function is an operating system that you're using. This command will download files used in tests,
195-
and on macOS it will also try to download BitByteData dependency, which requires having Carthage installed.
196-
197-
Currently, the Carthage part of this procedure may fail when using Xcode 12 or later. In that case you should manually
198-
run `carthage update --use-xcframeworks --no-use-binaries` or use
199-
[xconfig workaround](https://github.com/Carthage/Carthage/blob/master/Documentation/Xcode12Workaround.md). Please also
200-
note that when on working on SWCompression in Xcode when building the project you may see ld warnings about a directory
201-
not being found. These are expected and harmless. Finally, you should keep in mind that support for non-xcframework method
202-
of installing dependencies is likely to be dropped in the future major update.
196+
and on macOS it will also try to download BitByteData dependency, which requires having Carthage installed. When using
197+
Xcode 12 or later, you should also pass the `--xcf` option, or use the
198+
[xconfig workaround](https://github.com/Carthage/Carthage/blob/master/Documentation/Xcode12Workaround.md).
199+
Please also note that when working on SWCompression in Xcode when building the project you may see ld warnings about a
200+
directory not being found. These are expected and harmless. Finally, you should keep in mind that support for non-xcframework
201+
method of installing dependencies is likely to be dropped in the future major update.
203202

204203
Test files are stored in a [separate repository](https://github.com/tsolomko/SWCompression-Test-Files), using Git LFS.
205204
There are two reasons for this complicated setup. Firstly, some of these files can be quite big, and it would be
@@ -232,9 +231,6 @@ completely in Swift without Objective-C, it can also be used on __Linux__.
232231

233232
## Future plans
234233

235-
See [5.0 Update](https://github.com/tsolomko/SWCompression/projects/2) Project for the list of planned API changes and
236-
new features.
237-
238234
- Performance...
239235
- Better Deflate compression.
240236
- Something else...
@@ -248,7 +244,7 @@ new features.
248244
- [pyflate](http://www.paul.sladen.org/projects/pyflate/)
249245
- [Deflate specification](https://www.ietf.org/rfc/rfc1951.txt)
250246
- [GZip specification](https://www.ietf.org/rfc/rfc1952.txt)
251-
- [Zlib specfication](https://www.ietf.org/rfc/rfc1950.txt)
247+
- [Zlib specification](https://www.ietf.org/rfc/rfc1950.txt)
252248
- [LZMA SDK and specification](http://www.7-zip.org/sdk.html)
253249
- [XZ specification](http://tukaani.org/xz/xz-file-format-1.0.4.txt)
254250
- [Wikipedia article about LZMA](https://en.wikipedia.org/wiki/Lempel–Ziv–Markov_chain_algorithm)

SWCompression.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Pod::Spec.new do |s|
22

33
s.name = "SWCompression"
4-
s.version = "4.5.10"
4+
s.version = "4.5.11"
55
s.summary = "A framework with functions for working with compression, archives and containers."
66

77
s.description = "A framework with (de)compression algorithms and functions for processing various archives and containers."

SWCompression.xcodeproj/SWCompression.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
<key>CFBundlePackageType</key>
1616
<string>FMWK</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>4.5.10</string>
18+
<string>4.5.11</string>
1919
<key>CFBundleVersion</key>
20-
<string>77</string>
20+
<string>78</string>
2121
<key>NSHumanReadableCopyright</key>
2222
<string>Copyright © 2021 Timofey Solomko</string>
2323
</dict>

SWCompression.xcodeproj/TestSWCompression.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
<key>CFBundlePackageType</key>
1616
<string>BNDL</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>4.5.10</string>
18+
<string>4.5.11</string>
1919
<key>CFBundleVersion</key>
20-
<string>77</string>
20+
<string>78</string>
2121
</dict>
2222
</plist>

SWCompression.xcodeproj/project.pbxproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1258,7 +1258,7 @@
12581258
CLANG_WARN_SUSPICIOUS_MOVE = YES;
12591259
CLANG_WARN_UNREACHABLE_CODE = YES;
12601260
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
1261-
CURRENT_PROJECT_VERSION = 77;
1261+
CURRENT_PROJECT_VERSION = 78;
12621262
DEBUG_INFORMATION_FORMAT = dwarf;
12631263
ENABLE_STRICT_OBJC_MSGSEND = YES;
12641264
ENABLE_TESTABILITY = YES;
@@ -1339,7 +1339,7 @@
13391339
CLANG_WARN_SUSPICIOUS_MOVE = YES;
13401340
CLANG_WARN_UNREACHABLE_CODE = YES;
13411341
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
1342-
CURRENT_PROJECT_VERSION = 77;
1342+
CURRENT_PROJECT_VERSION = 78;
13431343
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
13441344
ENABLE_STRICT_OBJC_MSGSEND = YES;
13451345
"FRAMEWORK_SEARCH_PATHS[sdk=appletvos*]" = (
@@ -1400,7 +1400,7 @@
14001400
APPLICATION_EXTENSION_API_ONLY = YES;
14011401
DEFINES_MODULE = YES;
14021402
DYLIB_COMPATIBILITY_VERSION = 1;
1403-
DYLIB_CURRENT_VERSION = 77;
1403+
DYLIB_CURRENT_VERSION = 78;
14041404
DYLIB_INSTALL_NAME_BASE = "@rpath";
14051405
INFOPLIST_FILE = SWCompression.xcodeproj/SWCompression.plist;
14061406
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
@@ -1427,7 +1427,7 @@
14271427
APPLICATION_EXTENSION_API_ONLY = YES;
14281428
DEFINES_MODULE = YES;
14291429
DYLIB_COMPATIBILITY_VERSION = 1;
1430-
DYLIB_CURRENT_VERSION = 77;
1430+
DYLIB_CURRENT_VERSION = 78;
14311431
DYLIB_INSTALL_NAME_BASE = "@rpath";
14321432
INFOPLIST_FILE = SWCompression.xcodeproj/SWCompression.plist;
14331433
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";

Sources/LZMA/LZMAProperties.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ public struct LZMAProperties {
4343
self.dictionarySize = dictionarySize
4444
}
4545

46+
/// Initializes LZMA properties with default values of lc, lp, pb, and dictionary size.
4647
public init() { }
4748

4849
init(lzmaByte: UInt8, _ dictSize: Int) throws {

0 commit comments

Comments
 (0)