-
Notifications
You must be signed in to change notification settings - Fork 41
Description
We have implemented support for BSD AR file format at: https://github.com/Lessica/SWCompression/tree/feature-bsd-ar
The reason not opening a pull request is that we have noticed you are submoduling a git repo for test files and your pipeline seems to be a little heavy for configurations. During our development, we simplified these process and we make all our AR file test work locally.
We would like yourself to merge the codes if you are ok with it. Estimated more than one repo are required to update for this merge.
The package structure are a little different from the upstream, follow are the changes we made.
Sources/SWCompression/AR
.
├── ArContainer.swift
├── ArEntry.swift
├── ArEntryInfo.swift
├── ArError.swift
├── ArHeader.swift
├── ArParser.swift
├── ArReader.swift
├── ArWriter.swift
├── Data+Ar.swift
└── LittleEndianByteReader+Ar.swift
Are the sources for AR API interface, supports reading and writing.
Sources/SWCompression/Common/Extensions.swift
Is a extension for ourself.
SWCompression/TAR/TarReader.swift
Is a bug fix for Apple stuff returning mismatch item from their document. If a nil is returned, do not throw an error.
Tests/SWCompressionTests/
.
├── ArCreateTests.swift
├── ArReaderTests.swift
├── ArTests.swift
└── ArWriterTests.swift
Tests/SWCompressionTests/Test Files/AR
Are tests we made.
Following files are changed but not required for merge, generally speaking, we move the unicode test string payload to files.
Tests/SWCompressionTests/Constants.swift
SevenZipTests.swift
TarReaderTests.swift
TarTests.swift
ZipTests.swift
...
With above changes applied to, we can make another check in README~
| | Zlib | GZip | XZ | ZIP | TAR | 7-Zip | AR |
| ----- | ---- | ---- | --- | --- | --- | ----- | --- |
| Read | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| Write | ✅ | ✅ | TBD | TBD | ✅ | TBD | ✅ |
Have a nice day~