Skip to content

Commit 4ad6940

Browse files
committed
Merge branch 'release-4.8.0'
2 parents 0ff80e3 + 86090a4 commit 4ad6940

152 files changed

Lines changed: 1993 additions & 449 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.jazzy.yaml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ sourcekitten_sourcefile: docs.json
33
clean: false
44
author: Timofey Solomko
55
module: SWCompression
6-
module_version: 4.7.0
7-
copyright: '© 2021 Timofey Solomko'
6+
module_version: 4.8.0
7+
copyright: '© 2022 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.7.0
10+
github_file_prefix: https://github.com/tsolomko/SWCompression/tree/4.8.0
1111
theme: fullwidth
1212

1313
custom_categories:
@@ -26,14 +26,20 @@ custom_categories:
2626
- XZArchive
2727
- ZlibArchive
2828
- ZlibHeader
29-
- name: Containers
29+
- name: 7-Zip
3030
children:
3131
- SevenZipContainer
3232
- SevenZipEntry
3333
- SevenZipEntryInfo
34+
- name: TAR
35+
children:
3436
- TarContainer
37+
- TarReader
38+
- TarWriter
3539
- TarEntry
3640
- TarEntryInfo
41+
- name: ZIP
42+
children:
3743
- ZipContainer
3844
- ZipEntry
3945
- ZipEntryInfo

CHANGELOG.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
# Changelog
22

3+
## 4.8.0
4+
5+
- Added `TarReader` and `TarWriter` structs which allow more iterative work with TAR containers while helping with
6+
reducing memory usage.
7+
- Fixed a crash that could happen when decompressing Deflate and BZip2 inputs truncated in a certain way.
8+
- In API reference documentation the Container category has been split into separate categories for each container type.
9+
- swcomp changes:
10+
- Certain error messages were made a bit clearer.
11+
- Added `reader-tar` and `writer-tar` subcommands to the `benchmark` command.
12+
- Changed the printing format of the benchmark speed.
13+
314
## 4.7.0
415

516
- Added full-featured support for LZ4 compression and decompression by introducing 5 new functions inside `LZ4` enum.
@@ -19,7 +30,7 @@
1930
TAR containers.
2031
- Added `un-lz4`, `comp-lz4`, and `comp-lz4-bd` subcommands to the `benchmark` command.
2132
- Benchmark commands for compression now report compression ratio.
22-
33+
2334
## 4.6.1
2435

2536
- Fixed a crash in LZMA2 when trying to process an empty `Data`.

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2021 Timofey Solomko
3+
Copyright (c) 2022 Timofey Solomko
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

SWCompression.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
Pod::Spec.new do |s|
22

33
s.name = "SWCompression"
4-
s.version = "4.7.0"
4+
s.version = "4.8.0"
55
s.summary = "A framework with functions for working with compression, archives and containers."
6-
6+
77
s.description = "A framework with (de)compression algorithms and functions for processing various archives and containers."
88

99
s.homepage = "https://github.com/tsolomko/SWCompression"

SWCompression.xcodeproj/SWCompression.plist

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
<key>CFBundlePackageType</key>
1616
<string>FMWK</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>4.7.0</string>
18+
<string>4.8.0</string>
1919
<key>CFBundleVersion</key>
20-
<string>83</string>
20+
<string>85</string>
2121
<key>NSHumanReadableCopyright</key>
22-
<string>Copyright © 2021 Timofey Solomko</string>
22+
<string>Copyright © 2022 Timofey Solomko</string>
2323
</dict>
2424
</plist>

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.7.0</string>
18+
<string>4.8.0</string>
1919
<key>CFBundleVersion</key>
20-
<string>83</string>
20+
<string>85</string>
2121
</dict>
2222
</plist>

SWCompression.xcodeproj/project.pbxproj

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,9 @@
224224
E6421E8F271B54C6000359B6 /* test_7z_lz4.7z in Resources */ = {isa = PBXBuildFile; fileRef = E6421E8E271B54C6000359B6 /* test_7z_lz4.7z */; };
225225
E648151D26A889B8009261F0 /* TarHeader.swift in Sources */ = {isa = PBXBuildFile; fileRef = E648151C26A889B8009261F0 /* TarHeader.swift */; };
226226
E64F71BC26AAFD6A008BB308 /* Data+Tar.swift in Sources */ = {isa = PBXBuildFile; fileRef = E64F71BB26AAFD6A008BB308 /* Data+Tar.swift */; };
227+
E6522FB42789AF9600026B56 /* TarReaderTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E6522FB32789AF9600026B56 /* TarReaderTests.swift */; };
228+
E6522FB62789AFA600026B56 /* TarWriterTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E6522FB52789AFA600026B56 /* TarWriterTests.swift */; };
229+
E6522FBD2789C4A300026B56 /* FileHandle+CloseCompat.swift in Sources */ = {isa = PBXBuildFile; fileRef = E6522FBC2789C4A300026B56 /* FileHandle+CloseCompat.swift */; };
227230
E652D8F3263D670900FC229B /* test_nonstandard_runlength.bz2 in Resources */ = {isa = PBXBuildFile; fileRef = E652D8F2263D670900FC229B /* test_nonstandard_runlength.bz2 */; };
228231
E652D8F5263D678000FC229B /* test_nonstandard_runlength.answer in Resources */ = {isa = PBXBuildFile; fileRef = E652D8F4263D678000FC229B /* test_nonstandard_runlength.answer */; };
229232
E652FECA27007E79006BC312 /* test3.lz4 in Resources */ = {isa = PBXBuildFile; fileRef = E652FEC127007E78006BC312 /* test3.lz4 */; };
@@ -262,9 +265,11 @@
262265
E6791E1826FD001A003852A9 /* DataError.swift in Sources */ = {isa = PBXBuildFile; fileRef = E6791E1726FD001A003852A9 /* DataError.swift */; };
263266
E6791E1B26FD0094003852A9 /* LZ4.swift in Sources */ = {isa = PBXBuildFile; fileRef = E6791E1A26FD0094003852A9 /* LZ4.swift */; };
264267
E6791E3326FD05EC003852A9 /* LZ4Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E6791E3226FD05EC003852A9 /* LZ4Tests.swift */; };
268+
E694694327480EA6009C897A /* TarReader.swift in Sources */ = {isa = PBXBuildFile; fileRef = E694694227480EA6009C897A /* TarReader.swift */; };
265269
E6974C5B2701AC2600E06C60 /* test_dict_B5_dictID.lz4 in Resources */ = {isa = PBXBuildFile; fileRef = E6974C5A2701AC2600E06C60 /* test_dict_B5_dictID.lz4 */; };
266270
E69FAC922729ACD900D3C406 /* test_dos_latin_us.zip in Resources */ = {isa = PBXBuildFile; fileRef = E69FAC912729ACD900D3C406 /* test_dos_latin_us.zip */; };
267271
E6B18E85270884E300F9AB99 /* LZ4CompressionTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E6B18E84270884E300F9AB99 /* LZ4CompressionTests.swift */; };
272+
E6C057D627498F5A007C83DF /* TarWriter.swift in Sources */ = {isa = PBXBuildFile; fileRef = E6C057D527498F5A007C83DF /* TarWriter.swift */; };
268273
E6C4150726FE230A00F9D36F /* XxHash32.swift in Sources */ = {isa = PBXBuildFile; fileRef = E6C4150626FE230A00F9D36F /* XxHash32.swift */; };
269274
E6D86D2F26FE35C50032CFFA /* XxHash32Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E6D86D2E26FE35C50032CFFA /* XxHash32Tests.swift */; };
270275
E6DF9ECE2704BF14003BD91E /* test_multi_frame.lz4 in Resources */ = {isa = PBXBuildFile; fileRef = E6DF9ECD2704BF14003BD91E /* test_multi_frame.lz4 */; };
@@ -503,6 +508,9 @@
503508
E6421E8E271B54C6000359B6 /* test_7z_lz4.7z */ = {isa = PBXFileReference; lastKnownFileType = file; path = test_7z_lz4.7z; sourceTree = "<group>"; };
504509
E648151C26A889B8009261F0 /* TarHeader.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TarHeader.swift; sourceTree = "<group>"; };
505510
E64F71BB26AAFD6A008BB308 /* Data+Tar.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Data+Tar.swift"; sourceTree = "<group>"; };
511+
E6522FB32789AF9600026B56 /* TarReaderTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TarReaderTests.swift; sourceTree = "<group>"; };
512+
E6522FB52789AFA600026B56 /* TarWriterTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TarWriterTests.swift; sourceTree = "<group>"; };
513+
E6522FBC2789C4A300026B56 /* FileHandle+CloseCompat.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "FileHandle+CloseCompat.swift"; sourceTree = "<group>"; };
506514
E652D8F2263D670900FC229B /* test_nonstandard_runlength.bz2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = test_nonstandard_runlength.bz2; sourceTree = "<group>"; };
507515
E652D8F4263D678000FC229B /* test_nonstandard_runlength.answer */ = {isa = PBXFileReference; lastKnownFileType = file; path = test_nonstandard_runlength.answer; sourceTree = "<group>"; };
508516
E652FEC127007E78006BC312 /* test3.lz4 */ = {isa = PBXFileReference; lastKnownFileType = file; path = test3.lz4; sourceTree = "<group>"; };
@@ -541,9 +549,11 @@
541549
E6791E1726FD001A003852A9 /* DataError.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DataError.swift; sourceTree = "<group>"; };
542550
E6791E1A26FD0094003852A9 /* LZ4.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LZ4.swift; sourceTree = "<group>"; };
543551
E6791E3226FD05EC003852A9 /* LZ4Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LZ4Tests.swift; sourceTree = "<group>"; };
552+
E694694227480EA6009C897A /* TarReader.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TarReader.swift; sourceTree = "<group>"; };
544553
E6974C5A2701AC2600E06C60 /* test_dict_B5_dictID.lz4 */ = {isa = PBXFileReference; lastKnownFileType = file; path = test_dict_B5_dictID.lz4; sourceTree = "<group>"; };
545554
E69FAC912729ACD900D3C406 /* test_dos_latin_us.zip */ = {isa = PBXFileReference; lastKnownFileType = archive.zip; path = test_dos_latin_us.zip; sourceTree = "<group>"; };
546555
E6B18E84270884E300F9AB99 /* LZ4CompressionTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LZ4CompressionTests.swift; sourceTree = "<group>"; };
556+
E6C057D527498F5A007C83DF /* TarWriter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TarWriter.swift; sourceTree = "<group>"; };
547557
E6C4150626FE230A00F9D36F /* XxHash32.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = XxHash32.swift; sourceTree = "<group>"; };
548558
E6D86D2E26FE35C50032CFFA /* XxHash32Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = XxHash32Tests.swift; sourceTree = "<group>"; };
549559
E6DF9ECD2704BF14003BD91E /* test_multi_frame.lz4 */ = {isa = PBXFileReference; lastKnownFileType = file; path = test_multi_frame.lz4; sourceTree = "<group>"; };
@@ -744,6 +754,8 @@
744754
06ADB2D81EBCEFA60053A188 /* TarContainer.swift */,
745755
061C065B1F0E90E600832F0C /* TarEntry.swift */,
746756
0656B8251F8A960700111605 /* TarEntryInfo.swift */,
757+
E694694227480EA6009C897A /* TarReader.swift */,
758+
E6C057D527498F5A007C83DF /* TarWriter.swift */,
747759
06CFF6B12078C5A5003B8375 /* TarParser.swift */,
748760
E648151C26A889B8009261F0 /* TarHeader.swift */,
749761
062C1D7B1F8FCA9300917968 /* TarExtendedHeader.swift */,
@@ -804,7 +816,10 @@
804816
E6791E3226FD05EC003852A9 /* LZ4Tests.swift */,
805817
06F065AA1FFB763300312A82 /* SevenZipTests.swift */,
806818
06B15D9C210E17FC00AF2EA1 /* TarCreateTests.swift */,
819+
E6522FB52789AFA600026B56 /* TarWriterTests.swift */,
807820
06F065A61FFB763300312A82 /* TarTests.swift */,
821+
E6522FB32789AF9600026B56 /* TarReaderTests.swift */,
822+
E6522FBC2789C4A300026B56 /* FileHandle+CloseCompat.swift */,
808823
06F065A91FFB763300312A82 /* XzTests.swift */,
809824
06F065A41FFB763300312A82 /* ZipTests.swift */,
810825
06D42DA62067B71000C1A98B /* TestZipExtraField.swift */,
@@ -1120,7 +1135,7 @@
11201135
isa = PBXProject;
11211136
attributes = {
11221137
LastSwiftUpdateCheck = 0920;
1123-
LastUpgradeCheck = 1310;
1138+
LastUpgradeCheck = 1320;
11241139
ORGANIZATIONNAME = "Timofey Solomko";
11251140
TargetAttributes = {
11261141
06BE1AC71DB410F100EE0F59 = {
@@ -1340,6 +1355,7 @@
13401355
06955E491F65C761004D5D79 /* BZip2+Lengths.swift in Sources */,
13411356
06A393391DE0709300182E12 /* GzipArchive.swift in Sources */,
13421357
061C064D1F0E901C00832F0C /* ZipLocalHeader.swift in Sources */,
1358+
E694694327480EA6009C897A /* TarReader.swift in Sources */,
13431359
063DF10D1DE1F07800F38082 /* Extensions.swift in Sources */,
13441360
0620F4991F8E21F8001C9B7A /* DosAttributes.swift in Sources */,
13451361
0651FEC21F8E2E9100C49646 /* ContainerEntryType+Tar.swift in Sources */,
@@ -1350,6 +1366,7 @@
13501366
0620F4B81F8E248C001C9B7A /* ContainerEntryInfo.swift in Sources */,
13511367
06CDFCA81F111D9700292758 /* DeflateError.swift in Sources */,
13521368
069D0FF01E0D6CB600D8AA87 /* LZMARangeDecoder.swift in Sources */,
1369+
E6C057D627498F5A007C83DF /* TarWriter.swift in Sources */,
13531370
0634D9831F5207C30002B675 /* SuffixArray.swift in Sources */,
13541371
0656B8261F8A960700111605 /* TarEntryInfo.swift in Sources */,
13551372
061C06481F0E8FF500832F0C /* ZipCentralDirectoryEntry.swift in Sources */,
@@ -1438,12 +1455,14 @@
14381455
isa = PBXSourcesBuildPhase;
14391456
buildActionMask = 2147483647;
14401457
files = (
1458+
E6522FB62789AFA600026B56 /* TarWriterTests.swift in Sources */,
14411459
06F066151FFB763300312A82 /* ZlibTests.swift in Sources */,
14421460
06F066141FFB763300312A82 /* DeflateCompressionTests.swift in Sources */,
14431461
E6791E3326FD05EC003852A9 /* LZ4Tests.swift in Sources */,
14441462
E6B18E85270884E300F9AB99 /* LZ4CompressionTests.swift in Sources */,
14451463
06F066171FFB763300312A82 /* BZip2Tests.swift in Sources */,
14461464
06F066181FFB763300312A82 /* TarTests.swift in Sources */,
1465+
E6522FB42789AF9600026B56 /* TarReaderTests.swift in Sources */,
14471466
06516B782139505800C9823B /* Sha256Tests.swift in Sources */,
14481467
06B15D9D210E17FC00AF2EA1 /* TarCreateTests.swift in Sources */,
14491468
06F066191FFB763300312A82 /* GzipTests.swift in Sources */,
@@ -1452,6 +1471,7 @@
14521471
E6D86D2F26FE35C50032CFFA /* XxHash32Tests.swift in Sources */,
14531472
06F0661B1FFB763300312A82 /* XzTests.swift in Sources */,
14541473
06F0661E1FFB763300312A82 /* BZip2CompressionTests.swift in Sources */,
1474+
E6522FBD2789C4A300026B56 /* FileHandle+CloseCompat.swift in Sources */,
14551475
06F066131FFB763300312A82 /* Constants.swift in Sources */,
14561476
06F0661C1FFB763300312A82 /* SevenZipTests.swift in Sources */,
14571477
06F066161FFB763300312A82 /* ZipTests.swift in Sources */,
@@ -1492,7 +1512,7 @@
14921512
CLANG_WARN_SUSPICIOUS_MOVE = YES;
14931513
CLANG_WARN_UNREACHABLE_CODE = YES;
14941514
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
1495-
CURRENT_PROJECT_VERSION = 83;
1515+
CURRENT_PROJECT_VERSION = 85;
14961516
DEBUG_INFORMATION_FORMAT = dwarf;
14971517
ENABLE_STRICT_OBJC_MSGSEND = YES;
14981518
ENABLE_TESTABILITY = YES;
@@ -1573,7 +1593,7 @@
15731593
CLANG_WARN_SUSPICIOUS_MOVE = YES;
15741594
CLANG_WARN_UNREACHABLE_CODE = YES;
15751595
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
1576-
CURRENT_PROJECT_VERSION = 83;
1596+
CURRENT_PROJECT_VERSION = 85;
15771597
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
15781598
ENABLE_STRICT_OBJC_MSGSEND = YES;
15791599
"FRAMEWORK_SEARCH_PATHS[sdk=appletvos*]" = (
@@ -1634,7 +1654,7 @@
16341654
APPLICATION_EXTENSION_API_ONLY = YES;
16351655
DEFINES_MODULE = YES;
16361656
DYLIB_COMPATIBILITY_VERSION = 1;
1637-
DYLIB_CURRENT_VERSION = 83;
1657+
DYLIB_CURRENT_VERSION = 85;
16381658
DYLIB_INSTALL_NAME_BASE = "@rpath";
16391659
INFOPLIST_FILE = SWCompression.xcodeproj/SWCompression.plist;
16401660
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
@@ -1661,7 +1681,7 @@
16611681
APPLICATION_EXTENSION_API_ONLY = YES;
16621682
DEFINES_MODULE = YES;
16631683
DYLIB_COMPATIBILITY_VERSION = 1;
1664-
DYLIB_CURRENT_VERSION = 83;
1684+
DYLIB_CURRENT_VERSION = 85;
16651685
DYLIB_INSTALL_NAME_BASE = "@rpath";
16661686
INFOPLIST_FILE = SWCompression.xcodeproj/SWCompression.plist;
16671687
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";

SWCompression.xcodeproj/xcshareddata/xcschemes/SWCompression.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1310"
3+
LastUpgradeVersion = "1320"
44
version = "1.7">
55
<BuildAction
66
parallelizeBuildables = "YES"

Sources/7-Zip/7zCoder+Equatable.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) 2021 Timofey Solomko
1+
// Copyright (c) 2022 Timofey Solomko
22
// Licensed under MIT License
33
//
44
// See LICENSE for license information

Sources/7-Zip/7zCoder.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) 2021 Timofey Solomko
1+
// Copyright (c) 2022 Timofey Solomko
22
// Licensed under MIT License
33
//
44
// See LICENSE for license information

0 commit comments

Comments
 (0)