Skip to content

pruthvikar/Tar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tar

Carthage compatible

A simple implementation of Tar written in Swift.

Tar exposes the following headers

public static func untar(path: String, toPath: String, using: NSData.Algorithm? = nil)
public static func untar(data: NSData, toPath: String, using: NSData.Algorithm? = nil)
public static func tar(path: String, toPath: String, using: NSData.Algorithm? = nil)
public static func tar(path: String, using: NSData.Algorithm? = nil) -> NSData

NSData.Algorithm is an enum that represents the 4 different types of compression offered by Apple's Compression library

public enum Algorithm {
  case LZ4
  case LZFSE
  case LZMA
  case ZLIB
}

Installation

Tar is Carthage compatible. To install add the following to your Cartfile.

github "pruthvikar/Tar" 

For additional info on Carthage installation please visit https://github.com/Carthage/Carthage.

License

Tar is available under the GNU General Public License. See the LICENSE file for more info.

Inspired by daltoniam/tarkit