uint2048/light-swift-untar
This is a utility written in only 149 lines of Swift to extract tar files with the standard 512-block size, or a multiple thereof, created with the GNU tar command: `tar -cf`.
Functionality
This is a utility written in only 149 lines of Swift to extract tar files with the standard 512-block size, or a multiple thereof, created with the GNU tar command: tar -cf.
Warning: This code does not support GNU ZIP (gzip) compression, such as tar -czf, or non-standard block sizes.
Example
FileManager.default.createFilesAndDirectories(path: "file/path/extracted", tarPath: "file/path/42.tar")Objective-C
This code is a Swift port of NSFileManager+Tar.m from Octo's Light Untar for iOS written in Objective-C.
Since this code is NOT visible to Objective-C, if you are looking for an Objective-C version, check it out!
Package Metadata
Repository: uint2048/light-swift-untar
Default branch: main
README: README.md